diff --git a/godoc/vfs/os.go b/godoc/vfs/os.go index 78719b46..637d65fd 100644 --- a/godoc/vfs/os.go +++ b/godoc/vfs/os.go @@ -14,12 +14,12 @@ import ( "runtime" ) +// We expose a new variable because otherwise we need to copy the findGOROOT logic again +// from cmd/godoc which is already copied twice from the standard library. + // GOROOT returns the GOROOT path under which the godoc binary is running. // It is needed to check whether a filesystem root is under GOROOT or not. // This is set from cmd/godoc/main.go - -// We expose a new variable because otherwise we need to copy the findGOROOT logic again -// from cmd/godoc which is already copied twice from the standard library. var GOROOT = runtime.GOROOT() // OS returns an implementation of FileSystem reading from the