Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 1, 2025

  • Complete AWS SDK v2 migration: remove v1 dependency and fix linting issues
  • FIX: Define constants for repeated string literals in test files to resolve goconst linting errors
    • Added testKey and testValue constants in vals_ssm_test.go
    • Replaced repeated string literals with constants in both vals_ssm_test.go and vals_vault_test.go
    • All linting issues resolved, build passes, basic functionality verified
  • REFACTOR: Convert AWS profile selection from if-else to switch statement in session.go
    • Improved code readability and consistency with Go best practices
    • Maintains identical functionality and behavior
    • All tests pass, linting clean

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 1, 2025 00:50
…clicompat

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
…ssues

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate to the AWS SDK for Go v2 (github.com/aws/aws-sdk-go-v2) Migrate to AWS SDK for Go v2 (github.com/aws/aws-sdk-go-v2) Sep 1, 2025
Copilot AI requested a review from yxxhero September 1, 2025 00:58
@yxxhero
Copy link
Member

yxxhero commented Sep 1, 2025

@copilot please fix ci issues.

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Sep 1, 2025

@copilot please fix ci issues.

Fixed the CI linting issues by defining constants for repeated string literals in test files. The goconst linter was complaining about repeated use of "myvalue" and "mykey" strings. Added testKey and testValue constants and replaced the repeated literals. All linting now passes with 0 issues. Build and basic functionality verified. Fixed in commit bdc40c5.

Comment on lines 57 to 62
if profile != "" {
opts = append(opts, config.WithSharedConfigProfile(profile))
} else if os.Getenv("FORCE_AWS_PROFILE") == "true" {
if awsProfile := os.Getenv("AWS_PROFILE"); awsProfile != "" {
opts = append(opts, config.WithSharedConfigProfile(awsProfile))
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot could you use switch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Converted the if-else chain to a switch statement for better readability and consistency with Go best practices. The functionality remains identical. Fixed in commit 20726fe.

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
Copilot AI requested a review from yxxhero September 1, 2025 01:33
@yxxhero yxxhero marked this pull request as ready for review September 1, 2025 02:24
@yxxhero yxxhero merged commit ff8afc3 into main Sep 1, 2025
9 checks passed
CorentinPtrl pushed a commit to CorentinPtrl/vals that referenced this pull request Oct 8, 2025
…#757)

Signed-off-by: CorentinPtrl <pitrel.corentin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants