...

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

Documentation: cmd/go/testdata/script

     1# go get should update the go and toolchain lines in go.work
     2env TESTGO_VERSION=go1.21
     3env TESTGO_VERSION_SWITCH=switch
     4env GOTOOLCHAIN=auto
     5cp go.mod.new go.mod
     6cp go.work.new go.work
     7go get rsc.io/needgo121 rsc.io/needgo122 rsc.io/needgo123 rsc.io/needall
     8stderr '^go: rsc.io/needall@v0.0.1 requires go >= 1.23; switching to go1.23.9$'
     9stderr '^go: added rsc.io/needall v0.0.1'
    10grep 'go 1.23$' go.mod
    11grep 'go 1.23$' go.work
    12grep 'toolchain go1.23.9' go.mod
    13grep 'toolchain go1.23.9' go.work
    14
    15-- go.mod.new --
    16module m
    17go 1.1
    18
    19-- p.go --
    20package p
    21
    22-- go.work.new --
    23go 1.18
    24use .

View as plain text