...

Text file src/cmd/go/testdata/script/list_all_gobuild.txt

Documentation: cmd/go/testdata/script

     1# go list all should work with GOOS=linux because all packages build on Linux
     2env GOOS=linux
     3env GOARCH=amd64
     4go list all
     5
     6# go list all should work with GOOS=darwin, but it used to fail because
     7# in the absence of //go:build support, p looked like it needed q
     8# (p_test.go was not properly excluded), and q was Linux-only.
     9#
    10# Also testing with r and s that +build lines keep working.
    11env GOOS=darwin
    12go list all
    13
    14-- go.mod --
    15go 1.17
    16module m
    17
    18-- p/p.go --
    19package p
    20
    21-- p/p_test.go --
    22//go:build linux
    23
    24package p
    25
    26import "m/q"
    27
    28-- q/q_linux.go --
    29package q
    30
    31-- r/r.go --
    32package r
    33
    34-- r/r_test.go --
    35// +build linux
    36
    37package r
    38
    39import "m/s"
    40
    41-- s/s_linux.go --
    42package s

View as plain text