Better error handling

This commit is contained in:
Hendrik Hofstadt 2018-09-25 12:46:43 +02:00
parent 27c8f03daf
commit cfc2cb3fcc
2 changed files with 5 additions and 4 deletions

View File

@ -3,4 +3,5 @@ get_vendor_deps:
dep ensure -v
install:
go install ./
go install ./
go install ./alerter

View File

@ -56,7 +56,7 @@ func main() {
for {
err = monitor.sync()
if err != nil {
panic(err)
fmt.Printf("error syncing: %v\n", err)
}
time.Sleep(time.Second)
}
@ -64,10 +64,10 @@ func main() {
for {
select {
case <-time.Tick(time.Second):
case <-time.Tick(10 * time.Second):
err := monitor.getGovernance()
if err != nil {
panic(err)
fmt.Printf("error parsing governance: %v\n", err)
}
}
}