import.name/confi (go): Package confi is an ergonomic configuration parsing toolkit.  The schema is declared using a struct type, and values can be read from TOML files or set via command-line flags.  A pointer to a preallocated configuration object of a user-defined struct type must be passed to all functions.  The type can have an arbitrary number of nested structs (either embedded or through an initialized pointer).  Only exported fields can be used.  The object can be initialized with default values.  Slices of structs can be populated by appending TOML table arrays, or by indexing on the command line.  Dynamically created subtrees are supported via map[string]interface{} nodes. The map values must be struct pointers.  The field names are spelled in lower case in TOML files and on the command-line.  The accessor functions and flag values use dotted paths to identify the field, such as "audio.samplerate".  Supported field types are bool, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64, string, []string, and time.Duration.  The Get method is provided for completeness; the intended way to access configuration values is through direct struct field access.  Short example:  Longer example:  Example usage output:
Keywords: command-line|configuration|go|toml