Trivial fix: set unexported=true for builtin.
Godoc itself has a similar hack.
Fixes #12541
Change-Id: Ib701f867d117931eb6ec6de223941b52eb6cd4a7
Reviewed-on: https://go-review.googlesource.com/14441
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
buildPackage, userPath, symbol := parseArgs(flagSet.Args())
symbol, method := parseSymbol(symbol)
pkg := parsePackage(writer, buildPackage, userPath)
+
defer func() {
pkg.flush()
e := recover()
}
panic(e)
}()
+
+ // The builtin package needs special treatment: its symbols are lower
+ // case but we want to see them, always.
+ if pkg.build.ImportPath == "builtin" {
+ unexported = true
+ }
+
switch {
case symbol == "":
pkg.packageDoc()