aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_nomod.txt
blob: 7e0f55a602fd66fddd7430c00adfc7ec188c59fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Test go commands with no module.
env GO111MODULE=on

# go mod edit fails unless given explicit mod file argument
! go mod edit -json
go mod edit -json x.mod

# bug succeeds
[exec:echo] env BROWSER=echo
[exec:echo] go bug

# commands that load the package in the current directory fail
! go build
! go fmt
! go generate
! go get
! go install
! go list
! go run
! go test
! go vet

# clean succeeds, even with -modcache
go clean -modcache

# doc succeeds for standard library
go doc unsafe

# env succeeds
go env

# tool succeeds
go tool -n test2json

# version succeeds
go version

-- x.mod --
module m

-- x.go --
package main
func main() {}