import "github.com/ncw/rclone/fs/config/configstruct"
Package configstruct parses unstructured maps into structures
Set interprets the field names in defaults and looks up config values in the config passed in. Any values found in config will be set in the opt structure.
opt must be a pointer to a struct. The struct should have entirely public fields. The field names are converted from CamelCase to snake_case and looked up in the config supplied or a `config:"field_name"` is looked up.
If items are found then they are converted from string to native types and set in opt.
All the field types in the struct must implement fmt.Scanner.
StringToInterface turns in into an interface{} the same type as def
type Item struct { Name string // snake_case Field string // CamelCase Num int // number of the field in the struct Value interface{} }
Item describes a single entry in the options structure
Items parses the opt struct and returns a slice of Item objects.
opt must be a pointer to a struct. The struct should have entirely public fields.
The config_name is looked up in a struct tag called "config" or if not found is the field name converted from CamelCase to snake_case.
Package configstruct imports 6 packages (graph) and is imported by 6 packages. Updated 2019-08-13. Refresh now. Tools for package owners.