github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/mod_empty_err.txt (about)

     1  # This test checks error messages for non-existant packages in module mode.
     2  # Veries golang.org/issue/35414
     3  env GO111MODULE=on
     4  cd $WORK
     5  
     6  go list -e -f {{.Error}} .
     7  stdout 'package \.: no Go files in \$WORK'
     8  
     9  go list -e -f {{.Error}} ./empty
    10  stdout 'package \./empty: no Go files in \$WORK[/\\]empty'
    11  
    12  go list -e -f {{.Error}} ./exclude
    13  stdout 'package \./exclude: build constraints exclude all Go files in \$WORK[/\\]exclude'
    14  
    15  go list -e -f {{.Error}} ./missing
    16  stdout 'package \./missing: cannot find package "." in:\s*\$WORK[/\\]missing'
    17  
    18  # use 'go build -n' because 'go list' reports no error.
    19  ! go build -n ./testonly
    20  stderr 'example.com/m/testonly: no non-test Go files in \$WORK[/\\]testonly'
    21  
    22  -- $WORK/go.mod --
    23  module example.com/m
    24  
    25  go 1.14
    26  
    27  -- $WORK/empty/empty.txt --
    28  -- $WORK/exclude/exclude.go --
    29  // +build exclude
    30  
    31  package exclude
    32  -- $WORK/testonly/testonly_test.go --
    33  package testonly_test
    34  -- $WORK/excluded-stdout --
    35  package ./excluded: cannot find package "." in:
    36  	$WORK/excluded