...

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

Documentation: cmd/go/testdata/script

     1[short] skip
     2
     3# Packages in std do not have an install target.
     4go list -f '{{.Target}}' fmt
     5! stdout .
     6go list -export -f '{{.Export}}' fmt
     7stdout $GOCACHE
     8
     9# With GODEBUG=installgoroot=all, fmt has a target.
    10# (Though we can't try installing it without modifying goroot).
    11env GODEBUG=installgoroot=all
    12go list -f '{{.Target}}' fmt
    13stdout fmt\.a
    14
    15# However, the fake packages "builtin" and "unsafe" do not.
    16go list -f '{{.Target}}' builtin unsafe
    17! stdout .
    18go install builtin unsafe  # Should succeed as no-ops.
    19
    20# With CGO_ENABLED=0, packages that would have
    21# an install target with cgo on no longer do.
    22env GODEBUG=
    23env CGO_ENABLED=0
    24go list -f '{{.Target}}' runtime/cgo
    25! stdout .
    26go list -export -f '{{.Export}}' runtime/cgo
    27stdout $GOCACHE

View as plain text