Documentation
¶
Overview ¶
Package tinytoml provides a simplified TOML encoder and decoder
Package tinytoml implements a minimalist TOML parser and encoder that supports core TOML functionality while maintaining simplicity.
Features:
- Basic value types: strings, integers, floats, booleans
- Arrays of basic types, nested arrays, and mixed-type arrays
- Nested tables using dotted notation
- Dotted keys within tables (e.g. server.network.ip = "1.1.1.1")
- Struct tags for custom field names (e.g. `toml:"name"`)
- Comment handling (inline and single-line)
- Whitespace tolerance
- Table merging (last value wins)
- Basic string escape sequences (\n, \t, \r, \\)
Limitations:
- No support for table arrays
- No support for hex, octal, binary, or exponential number formats
- No multi-line keys or strings
- No inline table declarations
- No inline array declarations within tables
- No empty table declarations
- No datetime types
- No unicode escape sequences
- No key character escaping
- No literal strings (single quotes)
- Comments are discarded during parsing
The package aims for simplicity over completeness, making it suitable for basic configuration needs while maintaining strict TOML compatibility within its supported feature set.
Package tinytoml provides a simplified TOML encoder and decoder
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedTypes = []reflect.Kind{ reflect.Map, reflect.String, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.Bool, reflect.Struct, reflect.Slice, reflect.Array, reflect.Interface, }
SupportedTypes lists all Go types that can be marshaled/unmarshaled Includes basic types, composites and their variants
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.