go/doc, godoc: move export filtering into go/doc
- exports.go contains a stripped-down (but semantically unchanged) version of the code in go/ast/filter.go for export filtering - filter.go contains the documentation filtering code found before at the end of doc.go; this is simply a code move w/o any semantic changes - godoc now relies on go/doc for export filtering when creating documentation. It still has a separate form of export filtering for showing the source code version. This needs to be consolidated (perhaps the source form view should just be removed?). - Stripping of function bodies (stripFunctionBodies function of godoc.go) is now happening in doc.go (line 176). - doc.NewPackageDoc has an extra parameter "exportsOnly. If set to false, the behavior is as before. This function is only called once in our source code; a gofix module is probably not warranted. - Deleted doc.NewFileDoc - was never called. This change is mostly a code move w/ some minimal tweaks. It should not cause any changes to the behavior of godoc. It's a prerequisite for extracting anonymous embedded fields. R=golang-dev, r CC=golang-dev https://golang.org/cl/5502072
Showing
src/pkg/go/doc/exports.go
0 → 100644
src/pkg/go/doc/filter.go
0 → 100644
Please
register
or
sign in
to comment