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

     1  go env GOWORK
     2  stdout '^'$GOPATH'[\\/]src[\\/]go.work$'
     3  go env
     4  stdout '^(set )?GOWORK=''?'$GOPATH'[\\/]src[\\/]go.work''?$'
     5  
     6  cd ..
     7  go env GOWORK
     8  ! stdout .
     9  go env
    10  stdout 'GOWORK=("")?'
    11  
    12  cd src
    13  go env GOWORK
    14  stdout 'go.work'
    15  
    16  env GOWORK='off'
    17  go env GOWORK
    18  stdout 'off'
    19  
    20  ! go env -w GOWORK=off
    21  stderr '^go: GOWORK cannot be modified$'
    22  
    23  -- go.work --
    24  go 1.18
    25  
    26  use a
    27  -- a/go.mod --
    28  module example.com/a
    29  

View as plain text