blob: 6c322a00d607a95a0ea04c8972cd5beb4a3f590c (
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
|
env GO111MODULE=on
# After 'go get', the go.sum file should contain the sum for the module.
go get rsc.io/quote@v1.5.0
grep 'rsc.io/quote v1.5.0' go.sum
# If we replace the module and run 'go mod tidy', we should get a sum for the replacement.
go mod edit -replace rsc.io/quote@v1.5.0=rsc.io/quote@v1.5.1
go mod tidy
grep 'rsc.io/quote v1.5.1' go.sum
cp go.sum go.sum.tidy
# 'go mod vendor' should preserve that sum, and should not need to add any new entries.
go mod vendor
grep 'rsc.io/quote v1.5.1' go.sum
cmp go.sum go.sum.tidy
-- go.mod --
module golang.org/issue/27868
require rsc.io/quote v1.5.0
-- main.go --
package main
import _ "rsc.io/quote"
func main() {}
|