Documentation
¶
Index ¶
- func AnyMap(value any) map[string]any
- func AnySlice(value any) ([]any, bool)
- func BoolPtr(value any) *bool
- func Decode(text string, target any) error
- func DecodeFile(path string, target any) error
- func Encode(value any) (string, error)
- func IntPtr(value any) *int
- func IntValue(m map[string]any, key string, fallback int) int
- func LoadMerged(paths []string, depth int) (map[string]any, bool)
- func LoadMergedWithBase(base map[string]any, paths []string, depth int) (map[string]any, bool)
- func MergeValues(values Overlay[any], depth int) any
- func StringMap(value any) map[string]string
- func StringOrSlice(value any) []string
- func StringPtr(value any) *string
- func StringSlice(value any) []string
- func StringValue(m map[string]any, key string) string
- type Overlay
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFile ¶
DecodeFile decodes the TOML file at path into target
func IntValue ¶
IntValue returns the int at key, falling back when the key is missing or holds another type
func LoadMerged ¶
LoadMerged overlays each readable path onto the previous ones
func LoadMergedWithBase ¶
LoadMergedWithBase merges TOML files onto an already decoded base map
func MergeValues ¶
MergeValues overlays Over onto Base, merging maps only while depth remains. Below that Over replaces Base outright
func StringOrSlice ¶
StringOrSlice accepts either a bare string or a slice of them
func StringSlice ¶
StringSlice keeps the string elements of a TOML slice, dropping the rest