moby/internal
Sebastiaan van Stijn bd4ff31775
add more //go:build directives to prevent downgrading to go1.16 language
This is a follow-up to 2cf230951f, adding
more directives to adjust for some new code added since:

Before this patch:

    make -C ./internal/gocompat/
    GO111MODULE=off go generate .
    GO111MODULE=on go mod tidy
    GO111MODULE=on go test -v

    # github.com/docker/docker/internal/sliceutil
    internal/sliceutil/sliceutil.go:3:12: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
    internal/sliceutil/sliceutil.go:3:14: predeclared comparable requires go1.18 or later (-lang was set to go1.16; check go.mod)
    internal/sliceutil/sliceutil.go:4:19: invalid map key type T (missing comparable constraint)

    # github.com/docker/docker/libnetwork
    libnetwork/endpoint.go:252:17: implicit function instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)

    # github.com/docker/docker/daemon
    daemon/container_operations.go:682:9: implicit function instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
    daemon/inspect.go:42:18: implicit function instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)

With this patch:

    make -C ./internal/gocompat/
    GO111MODULE=off go generate .
    GO111MODULE=on go mod tidy
    GO111MODULE=on go test -v
    === RUN   TestModuleCompatibllity
        main_test.go:321: all packages have the correct go version specified through //go:build
    --- PASS: TestModuleCompatibllity (0.00s)
    PASS
    ok  	gocompat	0.031s
    make: Leaving directory '/go/src/github.com/docker/docker/internal/gocompat'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-25 11:18:44 +01:00
..
cleanups volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
compatcontext internal: Add compatcontext.WithoutCancel 2023-09-27 11:46:30 +02:00
mod Set BuildKit version using buildinfo 2023-04-25 12:30:52 +02:00
mounttree Add reusable chroot and unshare utilities 2022-10-26 12:06:31 -04:00
multierror Add a temporary drop-in replacement for errors.Join 2023-08-16 16:18:41 +02:00
safepath volumes/subpath: Plumb context 2024-01-19 17:32:21 +01:00
sliceutil add more //go:build directives to prevent downgrading to go1.16 language 2024-01-25 11:18:44 +01:00
test/suite Wire up tests to support otel tracing 2023-09-07 18:38:22 +00:00
testutils hack: Load special images on demand 2023-12-06 17:16:37 +01:00
tools remove some remaining pre-go1.17 build-tags 2023-08-24 17:51:07 +02:00
unix_noeintr internal/safepath: Handle EINTR in unix syscalls 2024-01-19 17:32:13 +01:00
unshare remove some remaining pre-go1.17 build-tags 2023-08-24 17:51:07 +02:00