Versions in this module Expand all Collapse all v0 v0.0.1 Jun 4, 2020 Changes in this version + const OrderAlphabetical + const OrderPreserve + func Marshal(v interface{}) ([]byte, error) + func Unmarshal(data []byte, v interface{}) error + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (d *Decoder) Decode(v interface{}) error + func (d *Decoder) SetTagName(v string) *Decoder + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) ArraysWithOneElementPerLine(v bool) *Encoder + func (e *Encoder) Encode(v interface{}) error + func (e *Encoder) Order(ord marshalOrder) *Encoder + func (e *Encoder) QuoteMapKeys(v bool) *Encoder + func (e *Encoder) SetTagComment(v string) *Encoder + func (e *Encoder) SetTagCommented(v string) *Encoder + func (e *Encoder) SetTagMultiline(v string) *Encoder + func (e *Encoder) SetTagName(v string) *Encoder + type Marshaler interface + MarshalTOML func() ([]byte, error) + type Position struct + Col int + Line int + func (p Position) Invalid() bool + func (p Position) String() string + type SetOptions struct + Comment string + Commented bool + Multiline bool + type Tree struct + func Load(content string) (tree *Tree, err error) + func LoadBytes(b []byte) (tree *Tree, err error) + func LoadFile(path string) (tree *Tree, err error) + func LoadReader(reader io.Reader) (tree *Tree, err error) + func TreeFromMap(m map[string]interface{}) (*Tree, error) + func (t *Tree) Delete(key string) error + func (t *Tree) DeletePath(keys []string) error + func (t *Tree) Get(key string) interface{} + func (t *Tree) GetDefault(key string, def interface{}) interface{} + func (t *Tree) GetPath(keys []string) interface{} + func (t *Tree) GetPosition(key string) Position + func (t *Tree) GetPositionPath(keys []string) Position + func (t *Tree) Has(key string) bool + func (t *Tree) HasPath(keys []string) bool + func (t *Tree) Keys() []string + func (t *Tree) Marshal() ([]byte, error) + func (t *Tree) Position() Position + func (t *Tree) Set(key string, value interface{}) + func (t *Tree) SetPath(keys []string, value interface{}) + func (t *Tree) SetPathWithComment(keys []string, comment string, commented bool, value interface{}) + func (t *Tree) SetPathWithOptions(keys []string, opts SetOptions, value interface{}) + func (t *Tree) SetWithComment(key string, comment string, commented bool, value interface{}) + func (t *Tree) SetWithOptions(key string, opts SetOptions, value interface{}) + func (t *Tree) String() string + func (t *Tree) ToMap() map[string]interface{} + func (t *Tree) ToTomlString() (string, error) + func (t *Tree) Unmarshal(v interface{}) error + func (t *Tree) WriteTo(w io.Writer) (int64, error)