mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-21 02:22:34 +01:00
Make config parse errors readable
This commit is contained in:
parent
40f1d35415
commit
e610fb3201
@ -254,12 +254,12 @@ func newConfigFromString(logger *logrus.Entry, input []byte) *config {
|
|||||||
viper.AutomaticEnv()
|
viper.AutomaticEnv()
|
||||||
|
|
||||||
if err := viper.ReadConfig(bytes.NewBuffer(input)); err != nil {
|
if err := viper.ReadConfig(bytes.NewBuffer(input)); err != nil {
|
||||||
logger.Fatalf("Failed to parse the configuration: %#v", err)
|
logger.Fatalf("Failed to parse the configuration: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg := &BridgeValues{}
|
cfg := &BridgeValues{}
|
||||||
if err := viper.Unmarshal(cfg); err != nil {
|
if err := viper.Unmarshal(cfg); err != nil {
|
||||||
logger.Fatalf("Failed to load the configuration: %#v", err)
|
logger.Fatalf("Failed to load the configuration: %s", err)
|
||||||
}
|
}
|
||||||
return &config{
|
return &config{
|
||||||
logger: logger,
|
logger: logger,
|
||||||
|
Loading…
Reference in New Issue
Block a user