mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
hack/validate: Add gocompat
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
committed by
Sebastiaan van Stijn
parent
2be7f48561
commit
a60603bfa3
10
hack/validate/gocompat
Executable file
10
hack/validate/gocompat
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
# This script verifies that all packages have the correct //go:build directives set.
|
||||
# This is necessary because when our code is consumed as a dependency in "module mode",
|
||||
# Go will implicitly generate a go.mod and assume "go1.16" language version if one
|
||||
# doesn't exist. Starting with Go 1.21, this causes compilation errors for any code
|
||||
# using features from newer Go versions.
|
||||
|
||||
make -C ./internal/gocompat
|
||||
Reference in New Issue
Block a user