Skip to content

toml.input #

fn auto_config #

deprecated: will be removed and not replaced due to flaky heuristics that leads to hard to find bugs
deprecated_after: 2022-06-18
fn auto_config(toml string) !Config

auto_config returns an, automatic determined, input Config based on heuristics found in toml One example of several of why it's deprecated:

struct Config #

struct Config {
	text      string // TOML text
	file_path string // '/path/to/file.toml'

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) read_input #

fn (c Config) read_input() !string

read_input returns either Config.text or the read file contents of Config.file_path depending on which one is not empty.