Documentation ¶
Index ¶
- Constants
- func GetCachePath(file string) string
- func GetConfigPath() (string, error)
- func GetDefault(section, key, defaultVal string, c Config) (string, error)
- func GetDefinitionDirs() []string
- func GetGlobalConfig(key, defaultVal string, c Config) (string, error)
- func IsSectionEnabled(section string, c Config) bool
- type ArrayConfig
- type Config
Constants ¶
View Source
const (
GlobalConfigSection = "global"
)
Variables ¶
This section is empty.
Functions ¶
func GetCachePath ¶ added in v1.7.0
func GetConfigPath ¶ added in v1.7.0
func GetDefault ¶
GetDefault gets a value from the config, with a default if it doesn't exist
func GetDefinitionDirs ¶ added in v1.7.0
func GetDefinitionDirs() []string
func GetGlobalConfig ¶
GetGlobalConfig gets a value from the Environment, the global config or a default fallback value if neither exists. If the key is "test", "CARDIGANN_TEST" is checked in the environment
func IsSectionEnabled ¶
IsSectionEnabled returns true if a section has an enabled=true
Types ¶
type ArrayConfig ¶
func (ArrayConfig) Section ¶
func (a ArrayConfig) Section(section string) (map[string]string, error)
func (ArrayConfig) Sections ¶
func (a ArrayConfig) Sections() ([]string, error)
func (ArrayConfig) Set ¶
func (a ArrayConfig) Set(section, key, value string) error
Click to show internal directories.
Click to hide internal directories.