| Server IP : 157.230.181.24 / Your IP : 216.73.217.11 Web Server : Apache/2.4.58 (Ubuntu) System : Linux conductive 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/go/src/cmd/go/testdata/script/ |
Upload File : |
# This test checks error messages for non-existent packages in module mode.
# Veries golang.org/issue/35414
env GO111MODULE=on
cd $WORK
go list -e -f {{.Error}} .
stdout 'no Go files in '$WORK
go list -e -f {{.Error}} ./empty
stdout 'no Go files in '$WORK${/}'empty'
go list -e -f {{.Error}} ./exclude
stdout 'build constraints exclude all Go files in '$WORK${/}'exclude'
go list -e -f {{.Error}} ./missing
stdout 'stat '$WORK'[/\\]missing: directory not found'
# use 'go build -n' because 'go list' reports no error.
! go build -n ./testonly
stderr 'example.com/m/testonly: no non-test Go files in '$WORK${/}'testonly'
-- $WORK/go.mod --
module example.com/m
go 1.14
-- $WORK/empty/empty.txt --
-- $WORK/exclude/exclude.go --
// +build exclude
package exclude
-- $WORK/testonly/testonly_test.go --
package testonly_test
-- $WORK/excluded-stdout --
package ./excluded: cannot find package "." in:
$WORK/excluded