Documentation ¶
Index ¶
- Constants
- Variables
- func GOPATH() (gopath string, has bool)
- func GOROOT() (goroot string, has bool)
- func LatestVersion(path string) (v string, err error)
- func LatestVersionFromProxy(path string) (v string, err error)
- func PKG() (pkg string)
- type Annotation
- type Annotations
- func (annotations *Annotations) Add(name string, param string)
- func (annotations *Annotations) FirstParam(name string) (value string, has bool)
- func (annotations *Annotations) Get(name string) (annotation Annotation, has bool)
- func (annotations *Annotations) Set(name string, param string)
- func (annotations *Annotations) Value(name string) (value string, has bool)
- type DepResult
- type DepVersion
- type Import
- type Imports
- type Module
- func (mod *Module) GetBuiltinType(path string, name string) (typ *Type, has bool)
- func (mod *Module) GetType(path string, name string) (typ *Type, has bool)
- func (mod *Module) Parse(ctx context.Context) (err error)
- func (mod *Module) ParseType(ctx context.Context, path string, name string) (typ *Type, err error)
- func (mod *Module) RegisterBuiltinType(typ *Type)
- func (mod *Module) Sources() *Sources
- func (mod *Module) String() (s string)
- func (mod *Module) Types() (types *Types)
- type Requires
- type SourceDirReader
- type SourceFile
- type Sources
- func (sources *Sources) DestinationPath(path string) (v string, err error)
- func (sources *Sources) FindFileInDir(path string, matcher func(file *ast.File) (ok bool)) (file *ast.File, err error)
- func (sources *Sources) FindTypeSpec(path string, name string) (spec *ast.TypeSpec, imports Imports, genericDoc string, err error)
- func (sources *Sources) ReadDir(path string, fn func(file *ast.File, filename string) (err error)) (err error)
- func (sources *Sources) ReadFile(path string, name string) (file *ast.File, filename string, err error)
- type Type
- type TypeKind
- type TypeParadigm
- type TypeScope
- type Types
- type Work
Constants ¶
View Source
const ( BasicKind = TypeKind(iota + 1) BuiltinKind IdentKind InterfaceKind StructKind StructFieldKind PointerKind ArrayKind MapKind AnyKind ParadigmKind ParadigmElementKind ReferenceKind )
Variables ¶
Functions ¶
func LatestVersion ¶
func LatestVersionFromProxy ¶
Types ¶
type Annotation ¶
func NewAnnotation ¶
func NewAnnotation(name string, params ...string) Annotation
type Annotations ¶
type Annotations []Annotation
func ParseAnnotations ¶
func ParseAnnotations(s string) (annotations Annotations, err error)
func (*Annotations) Add ¶
func (annotations *Annotations) Add(name string, param string)
func (*Annotations) FirstParam ¶
func (annotations *Annotations) FirstParam(name string) (value string, has bool)
func (*Annotations) Get ¶
func (annotations *Annotations) Get(name string) (annotation Annotation, has bool)
func (*Annotations) Set ¶
func (annotations *Annotations) Set(name string, param string)
type DepResult ¶
type DepResult struct {
Version DepVersion `json:"version"`
}
type DepVersion ¶
type DepVersion struct {
Version string `json:"version"`
}
type Imports ¶
Imports 一个fn文件一个,所以key不会重复,
func NewImportsFromAstFileImports ¶ added in v1.2.0
func NewImportsFromAstFileImports(specs []*ast.ImportSpec) (v Imports)
type Module ¶
type Module struct { Dir string Path string Version string Requires Requires Work *Work Replace *Module // contains filtered or unexported fields }
func (*Module) GetBuiltinType ¶ added in v1.2.0
func (*Module) RegisterBuiltinType ¶ added in v1.2.0
type SourceDirReader ¶
type SourceDirReader struct {
// contains filtered or unexported fields
}
type SourceFile ¶
type SourceFile struct {
// contains filtered or unexported fields
}
type Sources ¶
type Sources struct {
// contains filtered or unexported fields
}
func (*Sources) DestinationPath ¶ added in v1.2.0
func (*Sources) FindFileInDir ¶
func (*Sources) FindTypeSpec ¶
type Type ¶
type Type struct { Kind TypeKind Path string Name string Annotations Annotations Paradigms []*TypeParadigm Tags map[string]string Elements []*Type ParadigmsPacked *Type }
func (*Type) GetTopPaths ¶
type TypeParadigm ¶
func (*TypeParadigm) String ¶
func (tp *TypeParadigm) String() (v string)
type Types ¶
type Types struct {
// contains filtered or unexported fields
}
func (*Types) IsCodeErrorType ¶ added in v1.2.0
func (*Types) IsContextType ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.