blob: f8099ec93e38e416216eca5d84eab35745b65a2f (
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
|
# retract must not be used without a module directive.
! go list -m all
stderr 'go.mod:3: no module directive found, so retract cannot be used$'
# Commands that update go.mod should fix non-canonical versions in
# retract directives.
# Verifies #44494.
go mod edit -module=rsc.io/quote/v2
! go list -m all
stderr '^go: updates to go.mod needed; to update it:\n\tgo mod tidy$'
go mod tidy
go list -m all
cmp go.mod go.mod.want
-- go.mod --
go 1.16
retract latest
-- go.mod.want --
go 1.16
retract v2.0.1
module rsc.io/quote/v2
|