9
0
mirror of https://github.com/Lomanic/presence-button-web synced 2024-11-14 17:57:29 +00:00

Properly report JSON decoding error in init

This commit is contained in:
Lomanic 2020-10-24 19:09:08 +02:00
parent 006ab04b8c
commit 32afdde63d

View File

@ -105,8 +105,7 @@ func init() {
if err != nil && !os.IsNotExist(err) {
panic(err)
}
d := json.NewDecoder(db)
d.Decode(&status)
err = json.NewDecoder(db).Decode(&status)
if err != nil {
fmt.Println("error unmarshalling db:", err)
}