mirror of https://github.com/docker/cli.git
cli/command/image: add go:build tag to prevent downgrading go version
Before this: make shell make -C ./internal/gocompat/ ... GO111MODULE=on go test -v # github.com/docker/cli/cli/command/image ../../cli/command/image/push.go:177:62: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod) FAIL gocompat [build failed] make: *** [Makefile:3: verify] Error 1 make: Leaving directory '/go/src/github.com/docker/cli/internal/gocompat' After this patch: make shell make -C ./internal/gocompat/ ... GO111MODULE=on go test -v === RUN TestModuleCompatibllity main_test.go:133: all packages have the correct go version specified through //go:build --- PASS: TestModuleCompatibllity (0.00s) PASS ok gocompat 0.007s make: Leaving directory '/go/src/github.com/docker/cli/internal/gocompat' Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
69041853a8
commit
1fd8e2434b
|
@ -1,3 +1,6 @@
|
|||
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
|
||||
//go:build go1.19
|
||||
|
||||
package image
|
||||
|
||||
import (
|
||||
|
|
Loading…
Reference in New Issue