...

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

Documentation: cmd/go/testdata/script

     1[short] skip
     2
     3# list -json should generate output on stdout
     4go list -json ./...
     5stdout .
     6# list -f should generate output on stdout
     7go list -f '{{.}}' ./...
     8stdout .
     9
    10# test passing first -json then -f
    11! go list -json -f '{{.}}' ./...
    12stderr '^go list -f cannot be used with -json$'
    13
    14# test passing first -f then -json
    15! go list -f '{{.}}' -json ./...
    16stderr '^go list -f cannot be used with -json$'
    17-- go.mod --
    18module m
    19-- list_test.go --
    20package list_test

View as plain text