Discover Packages
github.com/quinn/restic
internal
options
package
Version:
v0.9.7
Opens a new window with list of versions in this module.
Published: Jul 25, 2020
License: BSD-2-Clause
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func Register(ns string , cfg interface{})
Register allows registering options so that they can be listed with List.
Help contains information about an option.
func List() (list []Help )
List returns a list of all registered options (using Register()).
Options holds options in the form key=value.
Parse takes a slice of key=value pairs and returns an Options type.
The key may include namespaces, separated by dots. Example: "foo.bar=value".
Keys are converted to lower-case.
Apply sets the options on dst via reflection, using the struct tag `option`.
The namespace argument (ns) is only used for error messages.
Extract returns an Options type with all keys in namespace ns, which is
also stripped from the keys. ns must end with a dot.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.