Documentation
¶
Index ¶
- func ChanDecls(decls []ast.Decl) <-chan ast.Decl
- func CmtGrpToStr(cg *ast.CommentGroup) (str string)
- func CmtToStr(cmt *ast.Comment) string
- func DeclsToTypes(decls []ast.Decl) <-chan *TypeSpec
- func FilterGenDecl(cin <-chan ast.Decl) <-chan *ast.GenDecl
- func FilterStructType(cin <-chan *ast.TypeSpec) <-chan *ast.StructType
- func FilterTypeSpec(cin <-chan *ast.GenDecl) <-chan *ast.TypeSpec
- type FieldSpec
- type TagField
- type TypeSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmtGrpToStr ¶
func CmtGrpToStr(cg *ast.CommentGroup) (str string)
CmtGrpToStr convert comment group to string read comment group to string
func DeclsToTypes ¶
DeclsToTypes filter and transform decls to types
func FilterGenDecl ¶
FilterGenDecl filter only GetDecl out of ast.Decl
func FilterStructType ¶
func FilterStructType(cin <-chan *ast.TypeSpec) <-chan *ast.StructType
FilterStructType filter only StructType from TypeSpec
Types ¶
type FieldSpec ¶
FieldSpec representation of a general struct field
func (*FieldSpec) Tagged ¶
Tagged determine if the field is tagged with value as the primary value (the 1st in comma separated list)
func (*FieldSpec) TaggedExtra ¶
TaggedExtra determine if the field is tagged with given secondary values (not 1st in comma separated list)
type TypeSpec ¶
TypeSpec representation of a general type spec
func ParseTypeSpec ¶
ParseTypeSpec parse a type spec into TypeSpec
func (*TypeSpec) FieldsTagged ¶
FieldsTagged return a channel that will yield all FieldSpec of field which is tagged a certain tag name and primary value
func (*TypeSpec) FieldsTaggedExtra ¶
FieldsTagged return a channel that will yield all FieldSpec of field which is tagged a certain tag name and secondary value