...

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

Documentation: cmd/go/testdata/script

     1# cmd/doc should use GOROOT to locate the 'go' command,
     2# not use whatever is in $PATH.
     3
     4# Remove 'go' from $PATH. (It can still be located via $GOROOT/bin/go, and the
     5# test script's built-in 'go' command still knows where to find it.)
     6env PATH=''
     7[GOOS:plan9] env path=''
     8
     9go doc p.X
    10
    11-- go.mod --
    12module example
    13
    14go 1.19
    15
    16require example.com/p v0.1.0
    17
    18replace example.com/p => ./pfork
    19-- example.go --
    20package example
    21
    22import _ "example.com/p"
    23-- pfork/go.mod --
    24module example.com/p
    25
    26go 1.19
    27-- pfork/p.go --
    28package p
    29
    30const X = 42

View as plain text