Skip to content

Deprecation warning: Replace exportloopref with copyloopvar in golangci-lint configuration #464

@derek10cloud

Description

@derek10cloud

When running golangci-lint locally, I encountered the following warning:
image

WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.

It seems that exportloopref is no longer relevant in Go 1.22 and has been replaced by copyloopvar. It is better to update the linter configuration to remove exportloopref and enable copyloopvar instead.

If possible, please assign this issue to me, and I’ll fix it right away.

Additionally, if there’s anything wrong with how I’m submitting this issue or any improvements you’d suggest, please feel free to let me know. 😃

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions