...

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

Documentation: cmd/go/testdata/script

     1! go run $PWD
     2! stderr 'no packages loaded'
     3stderr '^package example.net/nonmain is not a main package$'
     4
     5! go run .
     6stderr '^package example.net/nonmain is not a main package$'
     7
     8! go run ./...
     9stderr '^go: warning: "\./\.\.\." matched only non-main packages$'
    10stderr '^go: no packages loaded from \./\.\.\.$'
    11
    12-- go.mod --
    13module example.net/nonmain
    14
    15go 1.17
    16-- nonmain.go --
    17// Package nonmain is not a main package.
    18package nonmain

View as plain text