const TYPE_NULL
pub const TYPE_NULL = 0Purpose
Constant TYPE_NULL, defining protocol or algorithm parameters.
#encoding/toml`github.com/pelletier/-toml`: TOML document parser and query model. Parses key-value pairs, tables ([table]), comments (#...), strings, numbers, and booleans into a queryable Doc DOM.
const TYPE_NULLpub const TYPE_NULL = 0Constant TYPE_NULL, defining protocol or algorithm parameters.
const TYPE_BOOLpub const TYPE_BOOL = 1Constant TYPE_BOOL, defining protocol or algorithm parameters.
const TYPE_INTpub const TYPE_INT = 2Constant TYPE_INT, defining protocol or algorithm parameters.
const TYPE_STRINGpub const TYPE_STRING = 3Constant TYPE_STRING, defining protocol or algorithm parameters.
const TYPE_TABLEpub const TYPE_TABLE = 4Constant TYPE_TABLE, defining protocol or algorithm parameters.
struct Itempub struct Item {
pub key string
pub val string
pub val_type int
pub table string
pub index int
}Structure encapsulating key, val, val_type, table, index.
key stringval stringval_type inttable stringindex intstruct Docpub struct Doc {
pub items []Item
}Structure encapsulating items.
items []Itemparsepub fn parse(src &string) DocParse the input.
src &stringDoc — a value of this type
(&Doc) getpub fn (d &Doc) get(key &string) stringExecute get on &Doc.
d &DocDoc instance used by this call (borrow).key &stringstring — result string
(&Doc) get_inpub fn (d &Doc) get_in(table &string, key &string) stringOperation on &Doc: read in.
d &DocDoc instance used by this call (borrow).table &stringkey &stringstring — result string
(&Doc) array_lenpub fn (d &Doc) array_len(table &string) intarray_len counts [[table]] elements up to the last one holding a key.
d &DocDoc instance used by this call (borrow).table &stringint — a value of this type
(&Doc) get_atpub fn (d &Doc) get_at(table &string, index int, key &string) stringOperation on &Doc: read at.
d &DocDoc instance used by this call (borrow).table &stringindex intkey &stringstring — result string
(&Doc) haspub fn (d &Doc) has(key &string) boolExecute has on &Doc.
d &DocDoc instance used by this call (borrow).key &stringbool — true or false
(&Doc) get_intpub fn (d &Doc) get_int(key &string) intOperation on &Doc: read int.
d &DocDoc instance used by this call (borrow).key &stringint — a value of this type
(&Doc) get_boolpub fn (d &Doc) get_bool(key &string) boolOperation on &Doc: read bool.
d &DocDoc instance used by this call (borrow).key &stringbool — true or false
(&Doc) tablespub fn (d &Doc) tables() []stringExecute tables on &Doc.
d &DocDoc instance used by this call (borrow).[]string — slice result