add error handling for reading configuration #1
@ -93,7 +93,7 @@ func userdata(username, usersonline, ops string) Userinfo {
|
|||||||
}
|
}
|
||||||
viper.SetConfigFile(filename)
|
viper.SetConfigFile(filename)
|
||||||
if err := viper.ReadInConfig(); err != nil {
|
if err := viper.ReadInConfig(); err != nil {
|
||||||
log.Error("Couldn't read a users meta-info.toml file.", err, username)
|
log.Error("message", "Couldn't read a users meta-info.toml file.", "error", err, "user", username)
|
||||||
user := Userinfo{
|
user := Userinfo{
|
||||||
Name: username,
|
Name: username,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user