Last active
January 3, 2016 15:59
-
-
Save dmitshur/8486205 to your computer and use it in GitHub Desktop.
Patch to make godoc server display unexported symbols and work on commands. This may be useful for packages you're actively developing and want to see private API of. Modified package is "github.com/golang/gddo/doc".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/doc/builder.go b/doc/builder.go | |
index f772f54..c3b2203 100644 | |
--- a/doc/builder.go | |
+++ b/doc/builder.go | |
@@ -560,6 +560,7 @@ func newPackage(dir *gosrc.Directory) (*Package, error) { | |
if pkg.ImportPath == "builtin" { | |
mode |= doc.AllDecls | |
} | |
+ mode = doc.AllDecls | doc.AllMethods | |
dpkg := doc.New(apkg, pkg.ImportPath, mode) | |
@@ -572,7 +573,7 @@ func newPackage(dir *gosrc.Directory) (*Package, error) { | |
pkg.Synopsis = synopsis(pkg.Doc) | |
pkg.Examples = b.getExamples("") | |
- pkg.IsCmd = bpkg.IsCommand() | |
+ pkg.IsCmd = false | |
pkg.GOOS = ctxt.GOOS | |
pkg.GOARCH = ctxt.GOARCH | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment