parsing

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InterfaceTypeDef = "interface"
	StructTypeDef    = "struct"
	TimeTypeDef      = "time.Time"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type StructField

type StructField struct {
	Name    string
	Type    string
	Comment string
	Tag     string
}

StructField 结构体字段

func (*StructField) GetJsonTag added in v1.2.0

func (s *StructField) GetJsonTag() string

func (*StructField) GetTag added in v1.1.8

func (s *StructField) GetTag(tagName string) string

type StructFlat

type StructFlat struct {
	Name    string
	Comment string
	Fields  []*StructField
}

StructFlat 非嵌套结构体

func StructParser

func StructParser(src string) (structList []*StructFlat, err error)

StructParser golang struct 解析器

Jump to

Keyboard shortcuts

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