diff options
Diffstat (limited to 'src/cmd/go/testdata/script/build_tag_goexperiment.txt')
-rw-r--r-- | src/cmd/go/testdata/script/build_tag_goexperiment.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/cmd/go/testdata/script/build_tag_goexperiment.txt b/src/cmd/go/testdata/script/build_tag_goexperiment.txt new file mode 100644 index 0000000..bee218f --- /dev/null +++ b/src/cmd/go/testdata/script/build_tag_goexperiment.txt @@ -0,0 +1,31 @@ +[short] skip +# Reset all experiments so fieldtrack is definitely off. +env GOEXPERIMENT=none +go run m +stderr 'fieldtrack off' +# Turn fieldtrack on. +env GOEXPERIMENT=none,fieldtrack +go run m +stderr 'fieldtrack on' + +-- ft_off.go -- +// +build !goexperiment.fieldtrack + +package main + +func main() { + println("fieldtrack off") +} + +-- ft_on.go -- +// +build goexperiment.fieldtrack + +package main + +func main() { + println("fieldtrack on") +} + +-- go.mod -- +module m +go 1.14 |