type File struct{
Doc *CommentGroup //保存了通过DOC生成的注释信息,associated documentation; or nil
Package token.Pos // position of "package" keyword
Name *Ident // 保存了包名称 package name
Decls []Decl // 顶层代码块 top-level declarations; or nil
Scope *Scope // 包的作用域(会保存当前编译的go文件中所有包作用域的变量) package scope (this file only)
Imports []*ImportSpec // 导入语句 imports in this file
Unresolved []*Ident // unresolved identifiers in this file
Comments []*CommentGroup // 注释信息 list of all comments in the source file}
type File struct{
Doc *CommentGroup //保存了通过DOC生成的注释信息,associated documentation; or nil
Package token.Pos // position of "package" keyword
Name *Ident // 保存了包名称 package name
Decls []Decl // 顶层代码块 top-level declarations; or nil
Scope *Scope // 包的作用域(会保存当前编译的go文件中所有包作用域的变量) package scope (this file only)
Imports []*ImportSpec // 导入语句 imports in this file
Unresolved []*Ident // unresolved identifiers in this file
Comments []*CommentGroup // 注释信息 list of all comments in the source file}