type go/ast.File
68 uses
go/ast (current package)
ast.go#L1033: type File struct {
ast.go#L1044: func (f *File) Pos() token.Pos { return f.Package }
ast.go#L1045: func (f *File) End() token.Pos {
ast.go#L1059: Files map[string]*File // Go source files by filename
commentmap.go#L234: case *File, *Field, Decl, Spec, Stmt:
filter.go#L28: func FileExports(src *File) bool {
filter.go#L258: func FilterFile(src *File, f Filter) bool {
filter.go#L262: func filterFile(src *File, f Filter, export bool) bool {
filter.go#L344: func MergePackageFiles(pkg *Package, mode MergeMode) *File {
filter.go#L496: return &File{doc, pos, NewIdent(pkg.Name), decls, pkg.Scope, imports, nil, comments}
import.go#L15: func SortImports(fset *token.FileSet, f *File) {
import.go#L101: func sortSpecs(fset *token.FileSet, f *File, specs []Spec) []Spec {
resolve.go#L74: func NewPackage(fset *token.FileSet, files map[string]*File, importer Importer, universe *Scope) (*Package, error) {
walk.go#L348: case *File:
go/build
build.go#L1347: parsed *ast.File
go/doc
doc.go#L160: func NewFromFiles(fset *token.FileSet, files []*ast.File, importPath string, opts ...interface{}) (*Package, error) {
doc.go#L181: goFiles = make(map[string]*ast.File)
doc.go#L182: testGoFiles []*ast.File
example.go#L27: Play *ast.File // a whole program version of the example
example.go#L50: func Examples(testFiles ...*ast.File) []*Example {
example.go#L152: func playExample(file *ast.File, f *ast.FuncDecl) *ast.File {
example.go#L375: return &ast.File{
example.go#L384: func playExampleFile(file *ast.File) *ast.File {
exports.go#L300: func (r *reader) fileExports(src *ast.File) {
reader.go#L496: func (r *reader) readFile(src *ast.File) {
go/format
format.go#L56: var file *ast.File
format.go#L59: case *ast.File:
format.go#L62: if f, ok := n.Node.(*ast.File); ok {
format.go#L119: func hasUnsortedImports(file *ast.File) bool {
internal.go#L24: file *ast.File,
internal.go#L96: file *ast.File,
go/parser
interface.go#L80: func ParseFile(fset *token.FileSet, filename string, src interface{}, mode Mode) (f *ast.File, err error) {
interface.go#L105: f = &ast.File{
interface.go#L162: Files: make(map[string]*ast.File),
parser.go#L2521: func (p *parser) parseFile() *ast.File {
parser.go#L2581: return &ast.File{
go/printer
nodes.go#L1838: func (p *printer) file(src *ast.File) {
printer.go#L1045: case *ast.File:
printer.go#L1065: case *ast.File:
printer.go#L1114: } else if n, ok := node.(*ast.File); ok {
printer.go#L1151: case *ast.File:
golang.org/x/pkgsite/internal/fetch
load.go#L259: func loadFilesWithBuildContext(innerPath string, files map[string][]byte) (pkgName string, fileMap map[string]*ast.File, _ *token.FileSet, _ error) {
load.go#L263: goFiles = make(map[string]*ast.File)
golang.org/x/pkgsite/internal/godoc
encode_ast.gen.go#L3880: func encode_ast_File(e *codec.Encoder, x *ast.File) {
encode_ast.gen.go#L3919: func decode_ast_File(d *codec.Decoder, p **ast.File) {
encode_ast.gen.go#L3925: *p = ref.(*ast.File)
encode_ast.gen.go#L3928: var x ast.File
encode_ast.gen.go#L3960: codec.Register(&ast.File{},
encode_ast.gen.go#L3961: func(e *codec.Encoder, x interface{}) { encode_ast_File(e, x.(*ast.File)) },
encode_ast.gen.go#L3963: var x *ast.File
godoc.go#L47: AST *ast.File
godoc.go#L62: func (p *Package) AddFile(f *ast.File, removeNodes bool) {
godoc.go#L77: func removeUnusedASTNodes(pf *ast.File) {
render.go#L87: var allGoFiles []*ast.File
golang.org/x/pkgsite/internal/godoc/internal/doc
doc.go#L172: func NewFromFiles(fset *token.FileSet, files []*ast.File, importPath string, opts ...interface{}) (*Package, error) {
doc.go#L193: goFiles = make(map[string]*ast.File)
doc.go#L194: testGoFiles []*ast.File
example.go#L27: Play *ast.File // a whole program version of the example
example.go#L50: func Examples(fset *token.FileSet, testFiles ...*ast.File) []*Example {
example.go#L152: func playExample(fset *token.FileSet, file *ast.File, f *ast.FuncDecl) *ast.File {
example.go#L296: return &ast.File{
example.go#L501: func playExampleFile(file *ast.File) *ast.File {
exports.go#L300: func (r *reader) fileExports(src *ast.File) {
reader.go#L500: func (r *reader) readFile(src *ast.File) {
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |