]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/doc: add type-bound vars to global vars list
authorRob Pike <r@golang.org>
Wed, 6 May 2015 20:45:03 +0000 (13:45 -0700)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Wed, 6 May 2015 22:32:42 +0000 (22:32 +0000)
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/9764
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/cmd/doc/pkg.go

index d52dd978647d71cbd489b16038444ac20d89553e..3a0aa7ff894331a6b2adad030c75470ab2e7ceee 100644 (file)
@@ -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...)
        }