Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/dyson/tomlvar

Package tomlvar implements toml variable parsing. Usage: Parse a toml config using either Load, LoadFile or LoadReader. Define toml variables using tomlvar.String(), Bool(), Int(), etc. This declares an integer tomlvar, ENVVARNAME, stored in the pointer ip, with type *int. If you like, you can bind the tomlvar to a variable using the Var() functions. Or you can create custom tomlvars that satisfy the Value interface (with pointer receivers) and couple them to toml variable parsing by For such tomlvars, the default value is just the initial value of the variable. After all tomlvars are defined, call to parse the toml variables into the defined tomlvars. Tomlvars may then be used directly. If you're using the tomlvars themselves, they are all pointers; if you bind to variables, they're values. Integer tomlvars accept 1234, 0664 and may be negative. Boolean tomlvars may be true or false. Duration tomlvars accept any input valid for time.ParseDuration. The default set of tomlvars is controlled by top-level functions. The TomlVarSet type allows one to define independent sets of tomlvars, which facilitates independent config parsing from various sources. The methods of TomlVarSet are analogous to the top-level functions for the default tomlvar set.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/dyson/tomlvar
Keywords: config, go, toml
License: BSD-3-Clause
Latest release: almost 7 years ago
First release: almost 7 years ago
Namespace: github.com/dyson
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 26 days ago

    Loading...
    Readme
    Loading...