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

     1  env TEST_GODOC_URL_FILE=$WORK/url.txt
     2  
     3  # Outside of a module.
     4  go doc -http
     5  grep '/std' $TEST_GODOC_URL_FILE
     6  
     7  # Inside a module with a major version suffix.
     8  # We should use the major version suffix rather than
     9  # the location in the gopath (#75976).
    10  cd example.com/m
    11  go doc -http
    12  grep '/example.com/m/v5' $TEST_GODOC_URL_FILE
    13  go doc -http .
    14  grep '/example.com/m/v5' $TEST_GODOC_URL_FILE
    15  
    16  # In GOPATH mode, we should use the location in the GOPATH.
    17  env GO111MODULE=off
    18  go doc -http
    19  grep '/std' $TEST_GODOC_URL_FILE
    20  # TODO(matloob): This should probably this be the same as 'go doc -http .'
    21  ! grep '/example.com/m' $TEST_GODOC_URL_FILE
    22  go doc -http .
    23  grep '/example.com/m' $TEST_GODOC_URL_FILE
    24  ! grep '/example.com/m/v5' $TEST_GODOC_URL_FILE
    25  
    26  -- example.com/m/go.mod --
    27  module example.com/m/v5
    28  
    29  go 1.27
    30  -- example.com/m/m.go --
    31  package m

View as plain text