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

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

View as plain text