Skip to content

Commit 918d286

Browse files
committed
Fixed environment struct tags (hotfix: mxschmitt#108)
1 parent 7461418 commit 918d286

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

util/config.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ type Configuration struct {
3232
}
3333

3434
type redisConf struct {
35-
Host string `yaml:"Host" env:"REDIS_HOST"`
36-
Password string `yaml:"Password" env:"REDIS_PASSWORD"`
37-
DB int `yaml:"DB" env:"REDIS_DB"`
38-
MaxRetries int `yaml:"MaxRetries" env:"REDIS_MAX_RETRIES"`
39-
ReadTimeout string `yaml:"ReadTimeout" env:"REDIS_READ_TIMEOUT"`
40-
WriteTimeout string `yaml:"WriteTimeout" env:"REDIS_WRITE_TIMEOUT"`
35+
Host string `yaml:"Host" env:"HOST"`
36+
Password string `yaml:"Password" env:"PASSWORD"`
37+
DB int `yaml:"DB" env:"DB"`
38+
MaxRetries int `yaml:"MaxRetries" env:"MAX_RETRIES"`
39+
ReadTimeout string `yaml:"ReadTimeout" env:"READ_TIMEOUT"`
40+
WriteTimeout string `yaml:"WriteTimeout" env:"WRITE_TIMEOUT"`
4141
}
4242

4343
type oAuthConf struct {
@@ -86,7 +86,7 @@ func ReadInConfig() error {
8686
if err := envstruct.ApplyEnvVars(&Config, "GUS"); err != nil {
8787
return errors.Wrap(err, "could not apply environment configuration")
8888
}
89-
logrus.Info("Loaded configuration: %v", Config)
89+
logrus.Infof("Loaded configuration: %+v", Config)
9090
Config.DataDir, err = filepath.Abs(Config.DataDir)
9191
if err != nil {
9292
return errors.Wrap(err, "could not get relative data dir path")

0 commit comments

Comments
 (0)