aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2015-01-23 11:45:00 -0800
committerRobert Griesemer <gri@golang.org>2015-01-23 19:52:07 +0000
commit571d02d9fef357ffb7ffe341d30164123f686efb (patch)
tree9a9c0efcb7f8f1cf36fe350795f2484427fcfb3e /src
parentc8d7d0d9f117cfd3d7e13f4061e8a69b8d5afbf5 (diff)
downloadgo-571d02d9fef357ffb7ffe341d30164123f686efb.tar.xz
go/ast: document that ast.FilterFile always filters imports
Fixes #9248. Change-Id: Id1c50af5eb35d7720b8f0a4d4881414baf061d56 Reviewed-on: https://go-review.googlesource.com/3241 Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/go/ast/filter.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/go/ast/filter.go b/src/go/ast/filter.go
index fc3eeb4a1d..50e576ec04 100644
--- a/src/go/ast/filter.go
+++ b/src/go/ast/filter.go
@@ -221,8 +221,8 @@ func filterDecl(decl Decl, f Filter, export bool) bool {
// names from top-level declarations (including struct field and
// interface method names, but not from parameter lists) that don't
// pass through the filter f. If the declaration is empty afterwards,
-// the declaration is removed from the AST. The File.Comments list
-// is not changed.
+// the declaration is removed from the AST. Import declarations are
+// always removed. The File.Comments list is not changed.
//
// FilterFile returns true if there are any top-level declarations
// left after filtering; it returns false otherwise.