Help us shape the future of Go! Take the 2026 Go Developer Survey

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

     1  # Regression test for https://go.dev/issue/82237:
     2  # "go list -export" should not reuse export data across GOARCH values.
     3  
     4  env GOEXPERIMENT=golistexportnewformat
     5  env GOOS=linux
     6  
     7  env GOARCH=amd64
     8  go list -export -f '{{.Export}}' p.go
     9  cp stdout amd64.txt
    10  
    11  env GOARCH=386
    12  go list -export -f '{{.Export}}' p.go
    13  ! cmp stdout amd64.txt
    14  
    15  -- p.go --
    16  package p
    17  
    18  import "unsafe"
    19  
    20  const PtrSize = unsafe.Sizeof(uintptr(0))
    21  

View as plain text