extractor

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExternalParams

func AddExternalParams(extractor *Extractor, target *model.GenTarget, pkg *packages.Package) error

导出函数

func FindBuildCall

func FindBuildCall(fn *ast.FuncDecl, info *types.Info) *ast.CallExpr

func FindDigCallInBlock

func FindDigCallInBlock(block *ast.BlockStmt, info *types.Info, methodName string) *ast.CallExpr

func ValidateReturnType

func ValidateReturnType(fnDecl *ast.FuncDecl, info *types.Info) error

Types

type ExtractedArg

type ExtractedArg struct {
	model.Arg
	Type       types.Type
	TypeString string
}

---------- 新模型 ----------

type Extractor

type Extractor struct {
	// contains filtered or unexported fields
}

func NewExtractor

func NewExtractor(pkgMap map[string]*packages.Package, mainPkgPath string, strategy alias.AliasStrategy) *Extractor

NewExtractor 创建提取器

func (*Extractor) BuildFinalNodes

func (e *Extractor) BuildFinalNodes() ([]model.Node, error)

func (*Extractor) ExtractOptions

func (e *Extractor) ExtractOptions(expr ast.Expr, curPkg, realPkg *packages.Package) error

导出方法

func (*Extractor) PkgAliasMap

func (e *Extractor) PkgAliasMap() map[string]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL