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
Showing
This diff is collapsed.
This diff is collapsed.
Please
register
or
sign in
to comment