Documentation ¶
Index ¶
- type BaseInfo
- type InterfaceInfo
- type MethodInfo
- type PackageParser
- func (p *PackageParser) HandleFieldListForInterface(fields *ast.FieldList, f func(value string, namesLen int))
- func (p *PackageParser) HandleFuncType(funcType *ast.FuncType, methodInfo *MethodInfo)
- func (p *PackageParser) Parse()
- func (p *PackageParser) ParseFile(fileFullPath string, astFile *ast.File)
- type PostParser
- type PostParserFunc
- type Scanner
- func (s *Scanner) DisableImplementRelation()
- func (s *Scanner) FindInterfaceImplements(interfaceFullName string, newMethod string)
- func (s *Scanner) GetAllInterface() []string
- func (s *Scanner) GetInterface(name string) *InterfaceInfo
- func (s *Scanner) GetLineFunc(current int) func(i int, l *progress.Line)
- func (s *Scanner) Print()
- func (s *Scanner) Start(dir string, excludeDir []string)
- func (s *Scanner) SubModule(sub *Scanner, fullInterfaceName string, method string)
- type StructInfo
- type WrapperFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InterfaceInfo ¶
type InterfaceInfo struct { *BaseInfo // contains filtered or unexported fields }
func (*InterfaceInfo) ExcludeTokens ¶
func (i *InterfaceInfo) ExcludeTokens(methods []string)
func (*InterfaceInfo) GetImplements ¶
func (i *InterfaceInfo) GetImplements() []*StructInfo
func (*InterfaceInfo) IsIncludeInterface ¶
func (i *InterfaceInfo) IsIncludeInterface(name string) bool
func (*InterfaceInfo) Print ¶
func (i *InterfaceInfo) Print()
func (*InterfaceInfo) Tokens ¶
func (i *InterfaceInfo) Tokens()
type MethodInfo ¶
type MethodInfo struct {
// contains filtered or unexported fields
}
func (*MethodInfo) Equal ¶
func (m *MethodInfo) Equal(t *MethodInfo) bool
func (*MethodInfo) Print ¶
func (m *MethodInfo) Print()
type PackageParser ¶
type PackageParser struct {
// contains filtered or unexported fields
}
func NewPackageParser ¶
func (*PackageParser) HandleFieldListForInterface ¶
func (p *PackageParser) HandleFieldListForInterface(fields *ast.FieldList, f func(value string, namesLen int))
func (*PackageParser) HandleFuncType ¶
func (p *PackageParser) HandleFuncType(funcType *ast.FuncType, methodInfo *MethodInfo)
func (*PackageParser) Parse ¶
func (p *PackageParser) Parse()
type PostParser ¶
type PostParser interface {
Post(structs map[string]*StructInfo, interfaces map[string]*InterfaceInfo)
}
type PostParserFunc ¶
type PostParserFunc func(currentName string, innerName string, structs map[string]*StructInfo, interfaces map[string]*InterfaceInfo)
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func (*Scanner) DisableImplementRelation ¶
func (s *Scanner) DisableImplementRelation()
func (*Scanner) FindInterfaceImplements ¶
func (*Scanner) GetAllInterface ¶
func (*Scanner) GetInterface ¶
func (s *Scanner) GetInterface(name string) *InterfaceInfo
func (*Scanner) GetLineFunc ¶
type StructInfo ¶
type StructInfo struct { *BaseInfo // contains filtered or unexported fields }
func (*StructInfo) CanIgnoreImplement ¶
func (s *StructInfo) CanIgnoreImplement(info *InterfaceInfo) bool
func (*StructInfo) HasImplementInterface ¶
func (s *StructInfo) HasImplementInterface(i *InterfaceInfo) bool
func (*StructInfo) MethodReceiver ¶
func (s *StructInfo) MethodReceiver() (receiverName string, receiverType string)
func (*StructInfo) Print ¶
func (s *StructInfo) Print()
func (*StructInfo) Tokens ¶
func (s *StructInfo) Tokens()
type WrapperFunc ¶
type WrapperFunc struct {
CurrentName, InnerName string
PostFunc PostParserFunc
}
func (*WrapperFunc) Post ¶
func (w *WrapperFunc) Post(structs map[string]*StructInfo, interfaces map[string]*InterfaceInfo)
Click to show internal directories.
Click to hide internal directories.