Documentation
¶
Overview ¶
Package ir contains the Tony format implementation.
Index ¶
- Constants
- Variables
- func CheckTag(tag string) error
- func HeadTag(tag string) (string, string)
- func TagArgs(tag string) (string, []string, string)
- func TagCompose(tag string, args []string, oTag string) string
- func TagGet(tag, what string) (string, []string)
- func TagHas(tag, what string) bool
- func TagRemove(tag, what string) string
- func ToMap(node *Node) map[string]*Node
- func Truth(node *Node) bool
- type KeyVal
- type Node
- func FromBool(v bool) *Node
- func FromFloat(f float64) *Node
- func FromInt(v int64) *Node
- func FromIntKeysMap(yMap map[uint32]*Node) *Node
- func FromIntKeysMapAt(res *Node, yMap map[uint32]*Node) *Node
- func FromKeyVals(kvs []KeyVal) *Node
- func FromKeyValsAt(res *Node, kvs []KeyVal) *Node
- func FromMap(yMap map[string]*Node) *Node
- func FromSlice(ySlice []*Node) *Node
- func FromString(v string) *Node
- func FromStringAt(p *Node, v string) *Node
- func Get(y *Node, field string) *Node
- func Null() *Node
- func (y *Node) Clone() *Node
- func (y *Node) CloneTo(dst *Node) *Node
- func (y *Node) GetPath(yPath string) (*Node, error)
- func (y *Node) ListPath(dst []*Node, yPath string) ([]*Node, error)
- func (y *Node) MarshalJSON() ([]byte, error)
- func (y *Node) NonCommentParent() *Node
- func (y *Node) Path() string
- func (y *Node) ReType()
- func (y *Node) Root() *Node
- func (y *Node) ToIntKeysMap() (map[uint32]*Node, error)
- func (y *Node) UnmarshalJSON(d []byte) error
- func (y *Node) Visit(f func(y *Node, isPost bool) (bool, error)) error
- func (y *Node) WithTag(tag string) *Node
- type Path
- type Type
Constants ¶
View Source
const ( IntKeysTag = "!sparsearray" IntKeysFmt = "%d" MergeKey = "<<" )
Variables ¶
View Source
var ( ErrParse = errors.New("parse error") ErrBadFormat = format.ErrBadFormat )
Functions ¶
Types ¶
type Node ¶
type Node struct {
Type Type
Parent *Node
ParentIndex int
ParentField string
Fields []*Node
Values []*Node
Tag string
Lines []string
Comment *Node
String string
Bool bool
Number string
Float64 *float64
Int64 *int64
}
func FromIntKeysMap ¶
func FromKeyVals ¶
func FromKeyValsAt ¶
func FromString ¶
func FromStringAt ¶
func (*Node) MarshalJSON ¶
func (*Node) NonCommentParent ¶
func (*Node) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.