]> Cypherpunks repositories - gostls13.git/commit
godoc: support $GOPATH, simplify file system code
authorRuss Cox <rsc@golang.org>
Mon, 5 Mar 2012 15:02:46 +0000 (10:02 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 5 Mar 2012 15:02:46 +0000 (10:02 -0500)
commitfae0d35043b7a3f8f3673d79cbf1d4798ee5e5aa
tree35f7a9871d1c44505a7d5ca3ac5b2c9e51a7bddd
parenta347fdb035898f6c3344e112416a3eb9d0fb9cff
godoc: support $GOPATH, simplify file system code

The motivation for this CL is to support $GOPATH well.
Since we already have a FileSystem interface, implement a
Plan 9-style name space.  Bind each of the $GOPATH src
directories onto the $GOROOT src/pkg directory: now
everything is laid out exactly like a normal $GOROOT and
needs very little special case code.

The filter files are no longer used (by us), so I think they
can just be deleted.  Similarly, the Mapping code and the
FileSystem interface were two different ways to accomplish
the same end, so delete the Mapping code.

Within the implementation, since FileSystem is defined to be
slash-separated, use package path consistently, leaving
path/filepath only for manipulating operating system paths.

I kept the -path flag, but I think it can be deleted too.

Fixes #2234.
Fixes #3046.

R=gri, r, r, rsc
CC=golang-dev
https://golang.org/cl/5711058
13 files changed:
lib/godoc/package.html
src/cmd/godoc/appinit.go
src/cmd/godoc/codewalk.go
src/cmd/godoc/dirtrees.go
src/cmd/godoc/filesystem.go
src/cmd/godoc/godoc.go
src/cmd/godoc/httpzip.go [deleted file]
src/cmd/godoc/index.go
src/cmd/godoc/main.go
src/cmd/godoc/mapping.go [deleted file]
src/cmd/godoc/parser.go
src/cmd/godoc/utils.go
src/cmd/godoc/zip.go