Skip to content

toml.input #

fn auto_config #

fn auto_config(toml string) ?Config

auto_config returns an, automatic determined, input Config based on heuristics found in toml

struct Config #

struct Config {
	text      string
	file_path string

Config is used to configure input to the toml module.
Only one of the fields text and file_path is allowed to be set at time of configuration.

fn (Config) validate #

fn (c Config) validate() ?

validate returns an optional error if more than one of the fields in Config has a non-default value (empty string).

fn (Config) read_input #

fn (c Config) read_input() ?string