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