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

     1  # Issue 66207: provide a better error message when there's no
     2  # go directive in a go.work file so 1.18 is implicitly required.
     3  
     4  ! go list
     5  stderr 'go: module . listed in go.work file requires go >= 1.21, but go.work implicitly requires go 1.18; to update it:\s+go work use'
     6  
     7  go work use
     8  go list
     9  stdout foo
    10  
    11  -- go.work --
    12  use .
    13  -- go.mod --
    14  module foo
    15  
    16  go 1.21
    17  -- foo.go --
    18  package foo
    19  

View as plain text