mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
go/ast/filter.go:
- more orthogonal functionality of filter functions for better re-use go/doc/doc.go: - simplified interface - collect filenames of packages so that they can be shown godoc: - removed TODO, show list of package (linked) files used to create documentation R=rsc DELTA=130 (68 added, 24 deleted, 38 changed) OCL=32549 CL=32552
This commit is contained in:
parent
9717a794f4
commit
90e6656c51
6 changed files with 102 additions and 58 deletions
|
|
@ -444,12 +444,8 @@ func getPageInfo(path string) PageInfo {
|
|||
// compute package documentation
|
||||
var pdoc *doc.PackageDoc;
|
||||
if pkg != nil {
|
||||
// TODO(gri) Simplify DocReader interface: no need anymore to add
|
||||
// more than one file because of ast.PackageInterface.
|
||||
var r doc.DocReader;
|
||||
r.Init(pkg.Name, pathutil.Clean(path)); // no trailing '/' in importpath
|
||||
r.AddFile(ast.PackageExports(pkg));
|
||||
pdoc = r.Doc();
|
||||
ast.PackageExports(pkg);
|
||||
pdoc = doc.NewPackageDoc(pkg, pathutil.Clean(path)); // no trailing '/' in importpath
|
||||
}
|
||||
|
||||
return PageInfo{pdoc, subdirs};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue