mirror of
https://github.com/Lomanic/presence-button-web
synced 2025-12-07 12:26:31 +00:00
Properly report JSON decoding error in init
This commit is contained in:
parent
006ab04b8c
commit
32afdde63d
1 changed files with 1 additions and 2 deletions
3
main.go
3
main.go
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue