Documentation
¶
Index ¶
- func AddSearchPath(path string) error
- func Get(key string) interface{}
- func GetStruct(key string, output interface{}, hooks ...mapstructure.DecodeHookFunc) error
- func ParseConfig() error
- func Set(key string, value interface{}) error
- func SetConfigFileName(name string)
- func Sync() error
- func TLSConfig(ctx context.Context, token string) (*tls.Config, error)
- type FileNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSearchPath ¶
AddSearchPath adds a path to the list of folders scanned in order to search the config file. When opening the config file paths are scanned the order they are added
func GetStruct ¶
func GetStruct(key string, output interface{}, hooks ...mapstructure.DecodeHookFunc) error
GetStruct populates data of the given struct with config file content
func SetConfigFileName ¶
func SetConfigFileName(name string)
SetConfigFileName sets the configuration file name. The default value is "config"
Types ¶
type FileNotFoundError ¶
type FileNotFoundError struct {
}
FileNotFoundError defines a config file not found
func (*FileNotFoundError) Error ¶
func (*FileNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.