...
1# Test support for go mod edit -go to set language version.
2
3env GO111MODULE=on
4! go build
5stderr ' type alias requires'
6go mod edit -go=1.9
7grep 'go 1.9' go.mod
8go build
9
10# Reverting the version should force a rebuild and error instead of using
11# the cached 1.9 build. (https://golang.org/issue/37804)
12go mod edit -go=1.8
13! go build
14stderr 'type alias requires'
15
16# go=none should drop the line
17go mod edit -go=none
18! grep go go.mod
19
20-- go.mod --
21module m
22go 1.8
23
24-- alias.go --
25package alias
26type T = int
View as plain text