go.tools/cmd/godoc: search go.tools/cmd for command docs
Update golang/go#6527 R=r, dsymonds CC=golang-dev https://golang.org/cl/14526053
This commit is contained in:
parent
ce4c627192
commit
7b481db506
|
@ -56,8 +56,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultAddr = ":6060" // default webserver address
|
defaultAddr = ":6060" // default webserver address
|
||||||
templatePath = "code.google.com/p/go.tools/cmd/godoc/template"
|
toolsPath = "code.google.com/p/go.tools/cmd/"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -383,6 +383,11 @@ func main() {
|
||||||
if !filepath.IsAbs(path) {
|
if !filepath.IsAbs(path) {
|
||||||
abspath = pathpkg.Join(pres.CmdFSRoot(), path)
|
abspath = pathpkg.Join(pres.CmdFSRoot(), path)
|
||||||
cinfo = pres.GetCmdPageInfo(abspath, relpath, mode)
|
cinfo = pres.GetCmdPageInfo(abspath, relpath, mode)
|
||||||
|
if cinfo.IsEmpty() {
|
||||||
|
// Try go.tools/cmd if not found in $GOROOT/cmd.
|
||||||
|
abspath = pathpkg.Join(pres.PkgFSRoot(), toolsPath+path)
|
||||||
|
cinfo = pres.GetCmdPageInfo(abspath, relpath, mode)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine what to use
|
// determine what to use
|
||||||
|
|
Loading…
Reference in New Issue