ast

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintAstInfo

func PrintAstInfo(fileName, src string, mode parser.Mode)

print go file ast detail

Types

type AnalysisResult

type AnalysisResult struct {
	PkgName     string
	RecvMethods map[string][]MethodInfo // key RecvName
	Funcs       []FuncInfo
}

func ScanFuncDeclByComment

func ScanFuncDeclByComment(fileName, src, targetComment string) *AnalysisResult

find func and method in go file by target comment @see github.com\astaxie\beego\parser.go parserPkg @see github.com\astaxie\beego\parser.go parserComments

type FuncInfo

type FuncInfo struct {
	PkgName  string
	FuncName string
	Comment  []string
}

type MethodInfo

type MethodInfo struct {
	PkgName    string
	RecvName   string
	MethodName string
	Comment    []string
}

Jump to

Keyboard shortcuts

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