Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorSliceTypeNotAlign = errors.New("slice type not aligned") ErrorNilParser = errors.New("parser can not be nil") ErrorUnsupportedMap = errors.New("unsupported map type") )
View Source
var AppendAllFields = func(tags []string) TagFunc { return func(tagKey string) string { buf := &bytes.Buffer{} buf.WriteString("`") for _, tag := range tags { buf.WriteString(tag) buf.WriteString(`:"`) buf.WriteString(tagKey) buf.WriteString(`" `) } buf.WriteString("`") return buf.String() } }
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct { // Parser - using to parse data into Node AST tree Parser // AppendTags - appending tags to strcut field by its name AppendTags TagFunc // contains filtered or unexported fields }
func NewConverter ¶ added in v0.1.1
type MapParser ¶ added in v0.1.1
type MapParser struct {
Data map[string]interface{}
}
MapParser - parse map[string]interface{} into Node Tree
func (*MapParser) ParseToNodeTree ¶ added in v0.1.1
type Parser ¶ added in v0.1.1
func NewMapParser ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.