github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/sum_readonly.txt (about) 1 # Test that go.sum does not get updated when -mod=readonly flag is set 2 env GO111MODULE=on 3 4 go get -d rsc.io/quote 5 go mod tidy 6 7 # go.sum != dirty; -mod=readonly 8 go list -mod=readonly 9 10 # dirty up go.sum by removing it. 11 rm go.sum 12 13 # go.sum == dirty; -mod=readonly 14 ! go list -mod=readonly 15 16 stderr 'go: updates to go.sum needed, disabled by -mod=readonly' 17 18 -- go.mod -- 19 module m 20 21 -- main.go -- 22 23 package main 24 25 import "rsc.io/quote" 26 27 func main() { 28 println(quote.Hello()) 29 }