]> Cypherpunks repositories - gostls13.git/commit
go/doc, godoc: move export filtering into go/doc
authorRobert Griesemer <gri@golang.org>
Thu, 22 Dec 2011 23:28:15 +0000 (15:28 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 22 Dec 2011 23:28:15 +0000 (15:28 -0800)
commit198936f2b871669cefbeb26a6991fbfa3d934254
treecdff78283e8a16a661e50d431f3109ba6ef29f80
parent07db252222253ac103ff46ed85a1cccc1f33b73d
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
src/cmd/godoc/godoc.go
src/pkg/go/doc/Makefile
src/pkg/go/doc/doc.go
src/pkg/go/doc/exports.go [new file with mode: 0644]
src/pkg/go/doc/filter.go [new file with mode: 0644]