...

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

Documentation: cmd/go/testdata/script

     1# When adding a requirement, 'go get' prints a message for the requirement
     2# and for changed explicit dependencies. 'go get' does not print messages
     3# for changed indirect dependencies.
     4go list -m all
     5! stdout golang.org/x/text
     6go get rsc.io/quote@v1.5.2
     7stderr '^go: added rsc.io/quote v1.5.2$'
     8stderr '^go: upgraded rsc.io/sampler v1.0.0 => v1.3.0$'
     9! stderr '^go get.*golang.org/x/text'
    10go list -m all
    11stdout golang.org/x/text
    12cmp go.mod go.mod.upgrade
    13
    14# When removing a requirement, 'go get' prints a message for the requiremnent
    15# and for changed explicit dependencies. 'go get' does not print messages
    16# for changed indirect dependencies.
    17go get rsc.io/sampler@none
    18stderr '^go: downgraded rsc.io/quote v1.5.2 => v1.3.0$'
    19stderr '^go: removed rsc.io/sampler v1.3.0$'
    20! stderr '^go get.*golang.org/x/text'
    21cmp go.mod go.mod.downgrade
    22
    23# When removing or downgrading a requirement, 'go get' also prints a message
    24# for explicit dependencies removed as a consequence.
    25cp go.mod.usequote go.mod
    26go get rsc.io/quote@v1.5.1
    27stderr '^go: downgraded rsc.io/quote v1.5.2 => v1.5.1$'
    28stderr '^go: removed usequote v0.0.0$'
    29
    30-- go.mod --
    31module m
    32
    33go 1.16
    34
    35require rsc.io/sampler v1.0.0
    36-- go.sum --
    37rsc.io/sampler v1.0.0 h1:SRJnjyQ07sAtq6G4RcfJEmz8JxqLyj3PoGXG2VhbDWo=
    38rsc.io/sampler v1.0.0/go.mod h1:cqxpM3ZVz9VtirqxZPmrWzkQ+UkiNiGtkrN+B+i8kx8=
    39-- go.mod.upgrade --
    40module m
    41
    42go 1.16
    43
    44require (
    45	rsc.io/quote v1.5.2 // indirect
    46	rsc.io/sampler v1.3.0
    47)
    48-- go.mod.downgrade --
    49module m
    50
    51go 1.16
    52
    53require (
    54	golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c // indirect
    55	rsc.io/quote v1.3.0 // indirect
    56)
    57-- go.mod.usequote --
    58module m
    59
    60go 1.16
    61
    62require usequote v0.0.0
    63
    64replace usequote => ./usequote
    65-- usequote/go.mod --
    66module usequote
    67
    68go 1.16
    69
    70require rsc.io/quote v1.5.2

View as plain text