mirror of
https://github.com/Lomanic/presence-button-web
synced 2024-11-21 21:17:29 +00:00
Properly report JSON decoding error in init
This commit is contained in:
parent
006ab04b8c
commit
32afdde63d
3
main.go
3
main.go
@ -105,8 +105,7 @@ func init() {
|
|||||||
if err != nil && !os.IsNotExist(err) {
|
if err != nil && !os.IsNotExist(err) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
d := json.NewDecoder(db)
|
err = json.NewDecoder(db).Decode(&status)
|
||||||
d.Decode(&status)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("error unmarshalling db:", err)
|
fmt.Println("error unmarshalling db:", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user