1
0
mirror of https://github.com/golang/go synced 2024-11-12 03:50:21 -07:00

cmd/godoc: fix godoc net/http on windows

`godoc net/http` used to complain "/target contains more than one package: http, main"

R=golang-dev, bradfitz, rsc
CC=golang-dev
https://golang.org/cl/6852100
This commit is contained in:
Shenghou Ma 2012-12-01 00:42:50 +08:00
parent 9e30b708a1
commit 279199ebcc

View File

@ -853,12 +853,12 @@ type docServer struct {
// fsReadDir implements ReadDir for the go/build package.
func fsReadDir(dir string) ([]os.FileInfo, error) {
return fs.ReadDir(dir)
return fs.ReadDir(filepath.ToSlash(dir))
}
// fsOpenFile implements OpenFile for the go/build package.
func fsOpenFile(name string) (r io.ReadCloser, err error) {
data, err := ReadFile(fs, name)
data, err := ReadFile(fs, filepath.ToSlash(name))
if err != nil {
return nil, err
}