Module toml.input stdlib

toml.input
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
1
Imported by:
3
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

  • Standard Library

Imported by

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn auto_config

deprecated:will be removed and not replaced due to flaky heuristics that leads to hard to find bugsdeprecated_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:

https://discord.com/channels/592103645835821068/592114487759470596/954101934988615721

Structs

#struct Config

pub struct Config {
pub:
	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) 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

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

Interfaces

This section is empty.

Enums

This section is empty.