Commit da4fc529 authored by Rob Pike's avatar Rob Pike Committed by Gerrit Code Review

cmd/doc: add type-bound vars to global vars list

Already done for constants and funcs, but I didn't realize that some
global vars were also not in the global list. This fixes

	go doc build.Default

Change-Id: I768bde13a400259df3e46dddc9f58c8f0e993c72
Reviewed-on: https://go-review.googlesource.com/9764Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
parent e9827f62
......@@ -71,6 +71,7 @@ func parsePackage(pkg *build.Package, userPath string) *Package {
docPkg := doc.New(astPkg, pkg.ImportPath, doc.AllDecls)
for _, typ := range docPkg.Types {
docPkg.Consts = append(docPkg.Consts, typ.Consts...)
docPkg.Vars = append(docPkg.Vars, typ.Vars...)
docPkg.Funcs = append(docPkg.Funcs, typ.Funcs...)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment