Documentation
¶
Overview ¶
Package toml is the "toml" host module. See std/encoding/register.go for why this and its eight siblings each get their own leaf package instead of living in std's flat root, and how this directory's Module reaches the rest of magus without std importing back down to collect it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Module = std.Module{ Name: "toml", WASM: true, Path: "encoding/toml", Doc: "TOML parse and stringify (TOML 1.0 via pelletier/go-toml/v2).", Methods: []std.Method{ { Name: "parse", Doc: "Decode a TOML document into a value (tables become maps, arrays become lists, plus strings, numbers, bools, and datetimes); errors on invalid input.", Args: []std.Arg{{Name: "source", Type: std.TypeString}}, Returns: []std.Ret{{Type: std.TypeAny}}, Raises: true, Impl: TOMLParse, }, { Name: "stringify", Doc: "Encode a value to a TOML string; the top level must be a table/map, as TOML requires. Errors on unencodable input.", Args: []std.Arg{{Name: "value", Type: std.TypeAny}}, Returns: []std.Ret{{Type: std.TypeString}}, Raises: true, Impl: TOMLStringify, }, }, }
Module is the "toml" host module: TOML parse and stringify via pelletier/go-toml/v2. It mirrors the json and yaml modules so a magusfile can read a value out of a pyproject.toml / Cargo.toml the same way it reads package.json.
Functions ¶
func Modules ¶
Modules returns this directory's contribution to the encoding module set. See std/encoding/register.go: it aggregates every leaf's Modules() into one slice, which is how a module here reaches std.All()'s callers without std importing this package to collect it.
Types ¶
This section is empty.