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

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

View as plain text