LEFT | RIGHT |
(Both sides are equal) |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // This file implements export filtering of an AST. | 5 // This file implements export filtering of an AST. |
6 | 6 |
7 package doc | 7 package doc |
8 | 8 |
9 import ( | 9 import ( |
10 "go/ast" | 10 "go/ast" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 func (r *reader) fileExports(src *ast.File) { | 196 func (r *reader) fileExports(src *ast.File) { |
197 j := 0 | 197 j := 0 |
198 for _, d := range src.Decls { | 198 for _, d := range src.Decls { |
199 if r.filterDecl(d) { | 199 if r.filterDecl(d) { |
200 src.Decls[j] = d | 200 src.Decls[j] = d |
201 j++ | 201 j++ |
202 } | 202 } |
203 } | 203 } |
204 src.Decls = src.Decls[0:j] | 204 src.Decls = src.Decls[0:j] |
205 } | 205 } |
LEFT | RIGHT |