Handle error when parsing json config file

This commit is contained in:
Romain de Laage 2021-03-05 10:32:55 +01:00
parent 17b538f297
commit b6b7fd1cb5
Signed by: rdelaage
GPG Key ID: 534845FADDF0C329
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ func getConfig() Config {
var config Config
json.Unmarshal(configFile, &config)
err = json.Unmarshal(configFile, &config)
if err != nil {
log.Fatalln("config file: %s", err)
}
return config
}