Documentation
¶
Overview ¶
Package config provides configuration utilities for plugins.
Index ¶
- func GetBool(config Config, key string) (bool, bool)
- func GetBoolDefault(config Config, key string, defaultValue bool) bool
- func GetFloat(config Config, key string) (float64, bool)
- func GetFloatDefault(config Config, key string, defaultValue float64) float64
- func GetInt(config Config, key string) (int, bool)
- func GetIntDefault(config Config, key string, defaultValue int) int
- func GetString(config Config, key string) (string, bool)
- func GetStringDefault(config Config, key, defaultValue string) string
- func GetStringSlice(config Config, key string) ([]string, bool)
- func MustGetBool(config Config, key string) (bool, error)
- func MustGetFloat(config Config, key string) (float64, error)
- func MustGetInt(config Config, key string) (int, error)
- func MustGetString(config Config, key string) (string, error)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBoolDefault ¶
GetBoolDefault extracts a bool from config or returns the default value.
func GetFloatDefault ¶
GetFloatDefault extracts a float64 from config or returns the default value.
func GetIntDefault ¶
GetIntDefault extracts an int from config or returns the default value.
func GetStringDefault ¶
GetStringDefault extracts a string from config or returns the default value.
func GetStringSlice ¶
GetStringSlice extracts a []string from config, returning (value, found).
func MustGetBool ¶
MustGetBool extracts a required bool from config or returns error.
func MustGetFloat ¶
MustGetFloat extracts a required float64 from config or returns error.
func MustGetInt ¶
MustGetInt extracts a required int from config or returns error.
Types ¶
Click to show internal directories.
Click to hide internal directories.