Versions in this module Expand all Collapse all v0 v0.1.1 Jul 22, 2022 v0.1.0 Jul 22, 2022 Changes in this version + var FileTypeJson = "json" + var FileTypeToml = "toml" + var FileTypeYaml = "yaml" + func GetEnvString(key string, defaultValue string) string + func Load(filename string, val interface{}) error + func LoadJson(filename string, val interface{}) error + func LoadToml(filename string, val interface{}) error + func LoadWithType(filename string, cfgType string) (*viper.Viper, error) + func LoadYaml(filename string, val interface{}) error + type Config struct + func New(cfgDir string, opts ...Option) *Config + func (c *Config) Load(filename string, val interface{}) error + func (c *Config) LoadJson(filename string, val interface{}) error + func (c *Config) LoadToml(filename string, val interface{}) error + func (c *Config) LoadWithType(filename string, cfgType string) (v *viper.Viper, err error) + func (c *Config) LoadYaml(filename string, val interface{}) error + type Option func(*Config) + func WithEnv(name string) Option + func WithFileType(fileType string) Option