Versions in this module Expand all Collapse all v1 v1.2.1 Sep 17, 2019 Changes in this version + func LoadFileToI(path string, i interface{}) error + func WriteFile(path string, i interface{}) error v1.2.0 Jun 5, 2018 Changes in this version + type SetOptions struct + Comment string + Commented bool + Multiline bool type Tree + func (t *Tree) SetPathWithOptions(keys []string, opts SetOptions, value interface{}) + func (t *Tree) SetWithOptions(key string, opts SetOptions, value interface{}) v1.1.0 Jan 18, 2018 Changes in this version + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (d *Decoder) Decode(v interface{}) error + 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) QuoteMapKeys(v bool) *Encoder type Tree + func (t *Tree) Marshal() ([]byte, error) + func (t *Tree) SetPathWithComment(keys []string, comment string, commented bool, value interface{}) + func (t *Tree) SetWithComment(key string, comment string, commented bool, value interface{}) v1.0.1 Sep 24, 2017 Changes in this version type Tree + func LoadBytes(b []byte) (tree *Tree, err error) v1.0.0 May 31, 2017 Changes in this version + func Marshal(v interface{}) ([]byte, error) + func Unmarshal(data []byte, v interface{}) error + type Marshaler interface + MarshalTOML func() ([]byte, error) + type Tree struct + 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) Position() Position + func (t *Tree) Set(key string, value interface{}) + func (t *Tree) SetPath(keys []string, 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) v0 v0.5.0 Mar 2, 2017 Changes in this version type TomlTree + func (t *TomlTree) ToTomlString() (string, error) + func (t *TomlTree) WriteTo(w io.Writer) (int64, error) v0.4.0 Dec 2, 2016 Changes in this version + type NodeFilterFn func(node interface{}) bool + type Position struct + Col int + Line int + func (p Position) Invalid() bool + func (p Position) String() string + type Query struct + func CompileQuery(path string) (*Query, error) + func (q *Query) Execute(tree *TomlTree) *QueryResult + func (q *Query) SetFilter(name string, fn NodeFilterFn) + type QueryResult struct + func (r QueryResult) Positions() []Position + func (r QueryResult) Values() []interface{} + type TomlTree struct + func Load(content string) (tree *TomlTree, err error) + func LoadFile(path string) (tree *TomlTree, err error) + func LoadReader(reader io.Reader) (tree *TomlTree, err error) + func TreeFromMap(m map[string]interface{}) *TomlTree + func (t *TomlTree) Get(key string) interface{} + func (t *TomlTree) GetDefault(key string, def interface{}) interface{} + func (t *TomlTree) GetPath(keys []string) interface{} + func (t *TomlTree) GetPosition(key string) Position + func (t *TomlTree) GetPositionPath(keys []string) Position + func (t *TomlTree) Has(key string) bool + func (t *TomlTree) HasPath(keys []string) bool + func (t *TomlTree) Keys() []string + func (t *TomlTree) Query(query string) (*QueryResult, error) + func (t *TomlTree) Set(key string, value interface{}) + func (t *TomlTree) SetPath(keys []string, value interface{}) + func (t *TomlTree) String() string + func (t *TomlTree) ToMap() map[string]interface{} + func (t *TomlTree) ToString() string