ast_doc

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddImportFile

func AddImportFile(k, v string)

AddImportFile 添加自定义import文件列表

func EvalSymlinks(modPkg, modFile, objPkg string) string

EvalSymlinks Return to relative path . 通过module 游标返回包相对路径

func GetAstPackage

func GetAstPackage(objPkg, objFile string) (*ast.Package, bool)

GetAstPackage Parsing source file ast structure (with main restriction).解析源文件ast结构(带 main 限制)

func GetImportPkg

func GetImportPkg(i string) string

GetImportPkg 分析得出 pkg

func GetModuleInfo

func GetModuleInfo(n int) (string, string, bool)

GetModuleInfo 获取项目[module name] [根目录绝对地址]

func NewStructParser

func NewStructParser(modPkg, modFile string) *structParser

NewStructParser 新建一个导出结构体类

Types

type AstDoc

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

func NewAstDoc

func NewAstDoc(modPkg string, modFile string) *AstDoc

func (*AstDoc) FillPackage

func (a *AstDoc) FillPackage(objPkg string) error

func (*AstDoc) ResolveController

func (a *AstDoc) ResolveController(controllerName string) *ctlScheme

ResolveController analysis controller

@param controllerName

@return *ctlScheme

func (*AstDoc) ResolveMethod

func (a *AstDoc) ResolveMethod(methodName string) (*methodComment, *doc.StructInfo, *doc.StructInfo)

ResolveMethod analysis method by name

@param methodName

@return *methodComment
@return *doc.StructInfo
@return *doc.StructInfo

Jump to

Keyboard shortcuts

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