Files
garble/testdata/scripts/modinfo.txt
Daniel Martí ff0bea73b5 all: drop support for Go 1.15.x (#265)
This mainly cleans up the few bits of code where we explicitly kept
support for Go 1.15.x. With v0.1.0 released, we can drop support now,
since the next v0.2.0 release will only support Go 1.16.x.

Also updates all modules, including test ones, to 'go 1.16'.

Note that the TOOLEXEC_IMPORTPATH refactor is not done here, despite all
the TODOs about doing so when we drop 1.15 support. This is because that
refactor needs to be done carefully and might have side effects, so it's
best to keep it to a separate commit.

Finally, update the deps.
2021-03-05 16:52:00 +01:00

35 lines
536 B
Plaintext

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
go 1.16
-- 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