Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[27.x backport] update go:build tags to use go1.22, fix missing go:build tag #5622

Merged
merged 2 commits into from
Nov 15, 2024

Commits on Nov 15, 2024

  1. update go:build tags to use go1.22

    commit 4a7b04d configured golangci-lint
    to use go1.23 semantics, which enabled the copyloopvar linter.
    
    go1.22 now creates a copy of variables when assigned in a loop; make sure we
    don't have files that may downgrade semantics to go1.21 in case that also means
    disabling that feature; https://go.dev/ref/spec#Go_1.22
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    (cherry picked from commit 7c80e4f)
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    3df4036 View commit details
    Browse the repository at this point in the history
  2. cli/command/container: fix missing go:build tag

        make shell
        make -C ./internal/gocompat/
    
        GO111MODULE=on go test -v
        # github.com/docker/cli/cli/command/container
        ../../cli/command/container/completion.go:37:28: implicit function instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
        ../../cli/command/container/completion.go:82:25: implicit function instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
        ../../cli/command/container/completion.go:92:27: implicit function instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
        FAIL	gocompat [build failed]
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    (cherry picked from commit d1d5353)
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    cfe6090 View commit details
    Browse the repository at this point in the history