...

Text file src/cmd/go/testdata/script/mod_tidy_quote.txt

Documentation: cmd/go/testdata/script

     1# Check that mod tidy does not introduce repeated
     2# require statements when input go.mod has quoted requirements.
     3env GO111MODULE=on
     4
     5go mod tidy
     6grep -count=1 rsc.io/quote go.mod
     7
     8cp go.mod2 go.mod
     9go mod tidy
    10grep -count=1 rsc.io/quote go.mod
    11
    12
    13-- go.mod --
    14module x
    15
    16-- x.go --
    17package x
    18import "rsc.io/quote"
    19func main() { _ = quote.Hello }
    20
    21-- go.mod2 --
    22module x
    23require (
    24	"rsc.io/sampler" v1.3.0
    25	"rsc.io/quote" v1.5.2
    26)

View as plain text