mirror of https://github.com/golang/go.git
- remove wrong fix
(this corresponds to the currently running version of godoc) R=r DELTA=11 (0 added, 10 deleted, 1 changed) OCL=28238 CL=28238
This commit is contained in:
parent
5963f59067
commit
19c239c9af
|
|
@ -554,17 +554,7 @@ func (p *pakDesc) Doc() (*doc.PackageDoc, *parseErrors) {
|
||||||
|
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
// first file - initialize doc
|
// first file - initialize doc
|
||||||
// canonicalize importpath
|
r.Init(prog.Name.Value, p.importpath);
|
||||||
// (e.g. such that "template/template" becomes just "template")
|
|
||||||
// TODO This should not be needed here as similar functionality
|
|
||||||
// is elsewhere, but w/o this fix the output is incorrect
|
|
||||||
// for, say: "godoc template/template". Temporary work-around.
|
|
||||||
path := p.importpath;
|
|
||||||
dir, name := pathutil.Split(pathutil.Clean(path));
|
|
||||||
if name == prog.Name.Value {
|
|
||||||
path = pathutil.Clean(dir);
|
|
||||||
}
|
|
||||||
r.Init(prog.Name.Value, path);
|
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
r.AddProgram(prog);
|
r.AddProgram(prog);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue