dcode

package
v0.2.33 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateImport

func CreateImport(file *ast.File, packageName ...string)

createImport创建导入包

func DcodeJson

func DcodeJson(dir string)

func DcodeRouter

func DcodeRouter(router, controllerDir string) bool

自动检测代码路由

func GetGoModName

func GetGoModName() string

Types

type ControllerInfo

type ControllerInfo struct {
	PackageName    string
	Path           string
	Funcs          []FuncList
	ControllerName string
}

ControllerInfo 控制器信息

func DcodeController

func DcodeController(controllerDir string) []ControllerInfo

自动检测代码控制器

type DCodeController

type DCodeController struct {
	PackageName    string
	ControllerName string
	// contains filtered or unexported fields
}

控制器检测

func (*DCodeController) Finish

func (c *DCodeController) Finish()

Finish 遍历完成

func (*DCodeController) GetFuncList

func (c *DCodeController) GetFuncList() []FuncList

获得控制器的方法列表

func (*DCodeController) Visit

func (c *DCodeController) Visit(node ast.Node) ast.Visitor

Visit 遍历抽象语法树

type DCodeJson

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

路由检测

func (*DCodeJson) Finish

func (c *DCodeJson) Finish()

Finish 遍历完成

func (*DCodeJson) Visit

func (c *DCodeJson) Visit(node ast.Node) ast.Visitor

Visit 遍历抽象语法树

type DCodeRouter

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

路由检测

func (*DCodeRouter) Finish

func (c *DCodeRouter) Finish()

Finish 遍历完成

func (*DCodeRouter) Visit

func (c *DCodeRouter) Visit(node ast.Node) ast.Visitor

Visit 遍历抽象语法树

type FuncList

type FuncList struct {
	MethodName string
	Method     string
	Controller string
}

FuncList

Jump to

Keyboard shortcuts

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