Text file
src/cmd/go/testdata/script/list_template_context_function.txt
1 # This is a script test conversion of TestListTemplateContextFunction
2 # originally added in CL 20010, which fixed #14547.
3 # Test the ability to use the build context in the go list template.
4
5 go list -f '{{context.GOARCH}} {{context.GOOS}} {{context.GOROOT}} {{context.GOPATH}}'
6 cmpenv stdout want.txt
7
8 go list -f '{{context.CgoEnabled}} {{context.UseAllFiles}} {{context.Compiler}} {{context.BuildTags}} {{context.ReleaseTags}} {{context.InstallSuffix}}'
9
10 -- go.mod --
11 module foo
12 -- foo.go --
13 package foo
14 -- want.txt --
15 $GOARCH $GOOS $GOROOT $GOPATH
16
View as plain text