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

     1  # Test go commands with no module.
     2  env GO111MODULE=on
     3  
     4  # go mod edit fails unless given explicit mod file argument
     5  ! go mod edit -json
     6  go mod edit -json x.mod
     7  
     8  # bug succeeds
     9  [exec:echo] env BROWSER=echo
    10  [exec:echo] go bug
    11  
    12  # commands that load the package in the current directory fail
    13  ! go build
    14  ! go fmt
    15  ! go generate
    16  ! go get
    17  ! go install
    18  ! go list
    19  ! go run
    20  ! go test
    21  ! go vet
    22  
    23  # clean succeeds, even with -modcache
    24  go clean -modcache
    25  
    26  # doc succeeds for standard library
    27  go doc unsafe
    28  
    29  # env succeeds
    30  go env
    31  
    32  # tool succeeds
    33  go tool -n test2json
    34  
    35  # version succeeds
    36  go version
    37  
    38  -- x.mod --
    39  module m
    40  
    41  -- x.go --
    42  package main
    43  func main() {}
    44  

View as plain text