@@ -5,40 +5,40 @@ env GOPROXY=direct
5
5
# GOVCS stops go get
6
6
env GOVCS='*:none'
7
7
! go get github.com/google/go-cmp
8
- stderr 'go get: GOVCS disallows using git for public github.com/google/go-cmp'
8
+ stderr '^ go get: GOVCS disallows using git for public github.com/google/go-cmp; see ''go help vcs''$ '
9
9
env GOPRIVATE='github.com/google'
10
10
! go get github.com/google/go-cmp
11
- stderr 'go get: GOVCS disallows using git for private github.com/google/go-cmp'
11
+ stderr '^ go get: GOVCS disallows using git for private github.com/google/go-cmp; see ''go help vcs''$ '
12
12
13
13
# public pattern works
14
14
env GOPRIVATE='github.com/google'
15
15
env GOVCS='public:all,private:none'
16
16
! go get github.com/google/go-cmp
17
- stderr 'go get: GOVCS disallows using git for private github.com/google/go-cmp'
17
+ stderr '^ go get: GOVCS disallows using git for private github.com/google/go-cmp; see ''go help vcs''$ '
18
18
19
19
# private pattern works
20
20
env GOPRIVATE='hubgit.com/google'
21
21
env GOVCS='private:all,public:none'
22
22
! go get github.com/google/go-cmp
23
- stderr 'go get: GOVCS disallows using git for public github.com/google/go-cmp'
23
+ stderr '^ go get: GOVCS disallows using git for public github.com/google/go-cmp; see ''go help vcs''$ '
24
24
25
25
# other patterns work (for more patterns, see TestGOVCS)
26
26
env GOPRIVATE=
27
27
env GOVCS='github.com:svn|hg'
28
28
! go get github.com/google/go-cmp
29
- stderr 'go get: GOVCS disallows using git for public github.com/google/go-cmp'
29
+ stderr '^ go get: GOVCS disallows using git for public github.com/google/go-cmp; see ''go help vcs''$ '
30
30
env GOVCS='github.com/google/go-cmp/inner:git,github.com:svn|hg'
31
31
! go get github.com/google/go-cmp
32
- stderr 'go get: GOVCS disallows using git for public github.com/google/go-cmp'
32
+ stderr '^ go get: GOVCS disallows using git for public github.com/google/go-cmp; see ''go help vcs''$ '
33
33
34
34
# bad patterns are reported (for more bad patterns, see TestGOVCSErrors)
35
35
env GOVCS='git'
36
36
! go get github.com/google/go-cmp
37
- stderr 'go get github.com/google/go-cmp: malformed entry in GOVCS \(missing colon\): "git"'
37
+ stderr '^ go get github.com/google/go-cmp: malformed entry in GOVCS \(missing colon\): "git"$ '
38
38
39
39
env GOVCS=github.com:hg,github.com:git
40
40
! go get github.com/google/go-cmp
41
- stderr 'go get github.com/google/go-cmp: unreachable pattern in GOVCS: "github.com:git" after "github.com:hg"'
41
+ stderr '^ go get github.com/google/go-cmp: unreachable pattern in GOVCS: "github.com:git" after "github.com:hg"$ '
42
42
43
43
# bad GOVCS patterns do not stop commands that do not need to check VCS
44
44
go list
@@ -50,19 +50,19 @@ env GOPROXY=direct
50
50
env GOPRIVATE=
51
51
env GOVCS=
52
52
! go get rsc.io/nonexist.svn/hello
53
- stderr 'go get rsc.io/nonexist.svn/hello: GOVCS disallows using svn for public rsc.io/nonexist.svn'
53
+ stderr '^ go get rsc.io/nonexist.svn/hello: GOVCS disallows using svn for public rsc.io/nonexist.svn; see ''go help vcs''$ '
54
54
55
55
# fossil is disallowed by default
56
56
env GOPRIVATE=
57
57
env GOVCS=
58
58
! go get rsc.io/nonexist.fossil/hello
59
- stderr 'go get rsc.io/nonexist.fossil/hello: GOVCS disallows using fossil for public rsc.io/nonexist.fossil'
59
+ stderr '^ go get rsc.io/nonexist.fossil/hello: GOVCS disallows using fossil for public rsc.io/nonexist.fossil; see ''go help vcs''$ '
60
60
61
61
# bzr is disallowed by default
62
62
env GOPRIVATE=
63
63
env GOVCS=
64
64
! go get rsc.io/nonexist.bzr/hello
65
- stderr 'go get rsc.io/nonexist.bzr/hello: GOVCS disallows using bzr for public rsc.io/nonexist.bzr'
65
+ stderr '^ go get rsc.io/nonexist.bzr/hello: GOVCS disallows using bzr for public rsc.io/nonexist.bzr; see ''go help vcs''$ '
66
66
67
67
# git is OK by default
68
68
env GOVCS=
@@ -77,12 +77,12 @@ env GONOSUMDB='*'
77
77
# git can be disallowed
78
78
env GOVCS=public:hg
79
79
! go get rsc.io/nonexist.git/hello
80
- stderr 'go get rsc.io/nonexist.git/hello: GOVCS disallows using git for public rsc.io/nonexist.git'
80
+ stderr '^ go get rsc.io/nonexist.git/hello: GOVCS disallows using git for public rsc.io/nonexist.git; see ''go help vcs''$ '
81
81
82
82
# hg can be disallowed
83
83
env GOVCS=public:git
84
84
! go get rsc.io/nonexist.hg/hello
85
- stderr 'go get rsc.io/nonexist.hg/hello: GOVCS disallows using hg for public rsc.io/nonexist.hg'
85
+ stderr '^ go get rsc.io/nonexist.hg/hello: GOVCS disallows using hg for public rsc.io/nonexist.hg; see ''go help vcs''$ '
86
86
87
87
# Repeat in GOPATH mode. Error texts slightly different.
88
88
@@ -91,40 +91,40 @@ env GO111MODULE=off
91
91
# GOVCS stops go get
92
92
env GOVCS='*:none'
93
93
! go get github.com/google/go-cmp
94
- stderr 'package github.com/google/go-cmp: GOVCS disallows using git for public github.com/google/go-cmp'
94
+ stderr '^ package github.com/google/go-cmp: GOVCS disallows using git for public github.com/google/go-cmp; see ''go help vcs''$ '
95
95
env GOPRIVATE='github.com/google'
96
96
! go get github.com/google/go-cmp
97
- stderr 'package github.com/google/go-cmp: GOVCS disallows using git for private github.com/google/go-cmp'
97
+ stderr '^ package github.com/google/go-cmp: GOVCS disallows using git for private github.com/google/go-cmp; see ''go help vcs''$ '
98
98
99
99
# public pattern works
100
100
env GOPRIVATE='github.com/google'
101
101
env GOVCS='public:all,private:none'
102
102
! go get github.com/google/go-cmp
103
- stderr 'package github.com/google/go-cmp: GOVCS disallows using git for private github.com/google/go-cmp'
103
+ stderr '^ package github.com/google/go-cmp: GOVCS disallows using git for private github.com/google/go-cmp; see ''go help vcs''$ '
104
104
105
105
# private pattern works
106
106
env GOPRIVATE='hubgit.com/google'
107
107
env GOVCS='private:all,public:none'
108
108
! go get github.com/google/go-cmp
109
- stderr 'package github.com/google/go-cmp: GOVCS disallows using git for public github.com/google/go-cmp'
109
+ stderr '^ package github.com/google/go-cmp: GOVCS disallows using git for public github.com/google/go-cmp; see ''go help vcs''$ '
110
110
111
111
# other patterns work (for more patterns, see TestGOVCS)
112
112
env GOPRIVATE=
113
113
env GOVCS='github.com:svn|hg'
114
114
! go get github.com/google/go-cmp
115
- stderr 'package github.com/google/go-cmp: GOVCS disallows using git for public github.com/google/go-cmp'
115
+ stderr '^ package github.com/google/go-cmp: GOVCS disallows using git for public github.com/google/go-cmp; see ''go help vcs''$ '
116
116
env GOVCS='github.com/google/go-cmp/inner:git,github.com:svn|hg'
117
117
! go get github.com/google/go-cmp
118
- stderr 'package github.com/google/go-cmp: GOVCS disallows using git for public github.com/google/go-cmp'
118
+ stderr '^ package github.com/google/go-cmp: GOVCS disallows using git for public github.com/google/go-cmp; see ''go help vcs''$ '
119
119
120
120
# bad patterns are reported (for more bad patterns, see TestGOVCSErrors)
121
121
env GOVCS='git'
122
122
! go get github.com/google/go-cmp
123
- stderr 'package github.com/google/go-cmp: malformed entry in GOVCS \(missing colon\): "git"'
123
+ stderr '^ package github.com/google/go-cmp: malformed entry in GOVCS \(missing colon\): "git"$ '
124
124
125
125
env GOVCS=github.com:hg,github.com:git
126
126
! go get github.com/google/go-cmp
127
- stderr 'package github.com/google/go-cmp: unreachable pattern in GOVCS: "github.com:git" after "github.com:hg"'
127
+ stderr '^ package github.com/google/go-cmp: unreachable pattern in GOVCS: "github.com:git" after "github.com:hg"$ '
128
128
129
129
# bad GOVCS patterns do not stop commands that do not need to check VCS
130
130
go list
@@ -133,19 +133,19 @@ go list
133
133
env GOPRIVATE=
134
134
env GOVCS=
135
135
! go get rsc.io/nonexist.svn/hello
136
- stderr 'package rsc.io/nonexist.svn/hello: GOVCS disallows using svn for public rsc.io/nonexist.svn'
136
+ stderr '^ package rsc.io/nonexist.svn/hello: GOVCS disallows using svn for public rsc.io/nonexist.svn; see ''go help vcs''$ '
137
137
138
138
# fossil is disallowed by default
139
139
env GOPRIVATE=
140
140
env GOVCS=
141
141
! go get rsc.io/nonexist.fossil/hello
142
- stderr 'package rsc.io/nonexist.fossil/hello: GOVCS disallows using fossil for public rsc.io/nonexist.fossil'
142
+ stderr '^ package rsc.io/nonexist.fossil/hello: GOVCS disallows using fossil for public rsc.io/nonexist.fossil; see ''go help vcs''$ '
143
143
144
144
# bzr is disallowed by default
145
145
env GOPRIVATE=
146
146
env GOVCS=
147
147
! go get rsc.io/nonexist.bzr/hello
148
- stderr 'package rsc.io/nonexist.bzr/hello: GOVCS disallows using bzr for public rsc.io/nonexist.bzr'
148
+ stderr '^ package rsc.io/nonexist.bzr/hello: GOVCS disallows using bzr for public rsc.io/nonexist.bzr; see ''go help vcs''$ '
149
149
150
150
# git is OK by default
151
151
env GOVCS=
@@ -160,12 +160,12 @@ env GONOSUMDB='*'
160
160
# git can be disallowed
161
161
env GOVCS=public:hg
162
162
! go get rsc.io/nonexist.git/hello
163
- stderr 'package rsc.io/nonexist.git/hello: GOVCS disallows using git for public rsc.io/nonexist.git'
163
+ stderr '^ package rsc.io/nonexist.git/hello: GOVCS disallows using git for public rsc.io/nonexist.git; see ''go help vcs''$ '
164
164
165
165
# hg can be disallowed
166
166
env GOVCS=public:git
167
167
! go get rsc.io/nonexist.hg/hello
168
- stderr 'package rsc.io/nonexist.hg/hello: GOVCS disallows using hg for public rsc.io/nonexist.hg'
168
+ stderr '^ package rsc.io/nonexist.hg/hello: GOVCS disallows using hg for public rsc.io/nonexist.hg; see ''go help vcs''$ '
169
169
170
170
-- go.mod --
171
171
module m
0 commit comments