attribute

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegAttributeType added in v0.2.7

func RegAttributeType(name string, value AttributeType)

Types

type Attribute

type Attribute struct {
	Name  string
	Value string
	Type  AttributeType
	Index int
}

Attribute 注解命令

func ParseDoc

func ParseDoc(doc []string, name string) []*Attribute

ParseDoc 解析注解

type AttributeType

type AttributeType int
const (
	TypeHttpMethod AttributeType = iota //http 请求方法
	TypeOther                           //其他
	TypeDoc                             //注释内容
	TypeMiddleware                      //中间件类
	TypeParam                           //方法的参数和返回值专用
	TypeTagger                          //这种类型仅用于标记一些元素
	TypeInner
)

Jump to

Keyboard shortcuts

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