astutil

package
Version: v0.0.0-...-ee0865d Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MIT, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentTag

type CommentTag struct {
	// Tag的名字
	Name string
	// 参数
	Params maputil.StringInterface
}

注释的标签 可在注释中加入: // @tag_name {json args} 的标签

func (CommentTag) ParamsString

func (tag CommentTag) ParamsString() (r string)

type CommentTagList

type CommentTagList []*CommentTag

func NewCommentTagList

func NewCommentTagList(cg *ast.CommentGroup) (tags CommentTagList)

检查注释中是否包含标签, 返回标签信息

func (CommentTagList) ContainsTag

func (list CommentTagList) ContainsTag(key string) bool

func (CommentTagList) Filter

func (list CommentTagList) Filter(f func(item *CommentTag) bool) (r CommentTagList)

func (CommentTagList) Get

func (list CommentTagList) Get(key string) *CommentTag

func (CommentTagList) GetProp

func (list CommentTagList) GetProp(tag string, keys ...string) (data interface{}, err error)

func (*CommentTagList) Push

func (list *CommentTagList) Push(tag *CommentTag)

func (*CommentTagList) PushTags

func (list *CommentTagList) PushTags(tags CommentTagList)

func (CommentTagList) String

func (list CommentTagList) String() (r string)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL