magus v0.4.2 is out. See what's new
¶ View generated markdown

toml

TOML parse and stringify (TOML 1.0 via pelletier/go-toml/v2).

Naming convention: import the module under its bare name (import "toml"), reach members with a backslash, and call methods in camelCase: toml\someMethod.

Methods

parse

Decode a TOML document into a value (tables become maps, arrays become lists, plus strings, numbers, bools, and datetimes); errors on invalid input.

Signature: toml\parse(source) -> any - source

Parameter Type Optional Description
source string

Returns: any

stringify

Encode a value to a TOML string; the top level must be a table/map, as TOML requires. Errors on unencodable input.

Signature: toml\stringify(value) -> string - source

Parameter Type Optional Description
value any

Returns: string

generatedreference/buzz/tomlmodulestdlibmagusfile
Last updated (4f8cc295)
Earlier changes on this page (4)

Full history ↗ · Blame source ↗

Glossary

Magusfile

The magusfile.buzz that declares a project's targets (as export funs) and binds its spells. See targets.

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). See operations.

Module

A magus stdlib namespace a magusfile imports for host capabilities: filesystem, exec, vcs, and more. See the module reference.

Buzz

The language magusfiles are written in (the .buzz engine). See engines.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.