env GOPRIVATE=test/main garble build exec ./main cmp stderr main.stderr ! binsubstr main$exe '(devel)' [short] stop # no need to verify this with -short exec go build exec ./main cmp stderr main.stderr-orig binsubstr main$exe '(devel)' -- go.mod -- module test/main -- main.go -- package main import "runtime/debug" func main() { if info, ok := debug.ReadBuildInfo(); ok { println("version", info.Main.Version) } else { println("no version") } } -- main.stderr-orig -- version (devel) -- main.stderr -- no version