1
0
Fork 0
forked from External/ergo

clean up some old getters

This commit is contained in:
Shivaram Lingamneni 2019-05-22 19:07:12 -04:00
parent 05459012ef
commit 4b88a60ba6
9 changed files with 16 additions and 30 deletions

View file

@ -335,7 +335,8 @@ type Config struct {
Logging []logger.LoggingConfig
Debug struct {
RecoverFromErrors *bool `yaml:"recover-from-errors"`
RecoverFromErrors *bool `yaml:"recover-from-errors"`
recoverFromErrors bool
PprofListener *string `yaml:"pprof-listener"`
}
@ -669,9 +670,10 @@ func LoadConfig(filename string) (config *Config, err error) {
}
// RecoverFromErrors defaults to true
if config.Debug.RecoverFromErrors == nil {
config.Debug.RecoverFromErrors = new(bool)
*config.Debug.RecoverFromErrors = true
if config.Debug.RecoverFromErrors != nil {
config.Debug.recoverFromErrors = *config.Debug.RecoverFromErrors
} else {
config.Debug.recoverFromErrors = true
}
// casefold/validate server name