mirror of
https://github.com/golang/go
synced 2024-11-05 17:36:15 -07:00
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 (
|
||||
defaultAddr = ":6060" // default webserver address
|
||||
templatePath = "code.google.com/p/go.tools/cmd/godoc/template"
|
||||
defaultAddr = ":6060" // default webserver address
|
||||
toolsPath = "code.google.com/p/go.tools/cmd/"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -383,6 +383,11 @@ func main() {
|
||||
if !filepath.IsAbs(path) {
|
||||
abspath = pathpkg.Join(pres.CmdFSRoot(), path)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user