Skip to content

Fix golangci-lint errors in AWS SDK v2 migration#25

Closed
Copilot wants to merge 5 commits into
masterfrom
copilot/add-dedicated-test
Closed

Fix golangci-lint errors in AWS SDK v2 migration#25
Copilot wants to merge 5 commits into
masterfrom
copilot/add-dedicated-test

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 4, 2026

The AWS SDK v2 migration introduced 14 linting violations across gocritic, gofmt, lll, revive, and unused checks.

Changes

Performance & Memory

  • Use index iteration instead of value copy for []types.ObjectVersion (128 bytes per iteration)
  • Pass aws.Config by pointer instead of value (696 bytes per call)
// Before: copies 128 bytes per iteration
for _, object := range versions {
    // ...
}

// After: uses pointer to existing element
for i := range versions {
    object := &versions[i]
    // ...
}

Interface Naming

  • Rename S3APIAPI to avoid s3.S3API stuttering

Line Length

  • Split long interface method signatures:
ListObjectVersions(
    ctx context.Context, params *s3.ListObjectVersionsInput, optFns ...func(*s3.Options),
) (*s3.ListObjectVersionsOutput, error)

Code Cleanup

  • Remove 3 unused helper functions and their imports
  • Replace empty if-block with warning log for unsupported CA cert files
  • Apply gofmt formatting

Test Updates

  • Migrate folder_delete_objects_test.go mock client to AWS SDK v2 API interface
Original prompt

This section details on the original issue you should resolve

<issue_title>[FEATURE] dedicated test</issue_title>
<issue_description>### What feature would you like?

we need dedicated test for b1fbe51

Why is this feature useful?

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ply fix

Co-authored-by: chipitsine <2217296+chipitsine@users.noreply.github.com>
Copilot AI changed the title [WIP] Add dedicated test for pull request changes Add regression test for nil VersionId panic in DeleteObjects error logging Feb 4, 2026
Copilot AI requested a review from chipitsine February 4, 2026 15:51
Copilot AI and others added 3 commits February 4, 2026 16:17
Co-authored-by: chipitsine <2217296+chipitsine@users.noreply.github.com>
Co-authored-by: chipitsine <2217296+chipitsine@users.noreply.github.com>
Co-authored-by: chipitsine <2217296+chipitsine@users.noreply.github.com>
Copilot AI changed the title Add regression test for nil VersionId panic in DeleteObjects error logging Fix golangci-lint errors in AWS SDK v2 migration Feb 4, 2026
@chipitsine chipitsine closed this May 7, 2026
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.

[FEATURE] dedicated test

2 participants