diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2020-08-20 14:54:31 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2020-08-20 20:27:49 +0200 |
commit | 339a30fd1917011d8ad8a3900509f3a8880d569d (patch) | |
tree | a6e519b135c43e09cdbbefc5103783c56a3c3cf0 /pkg/backend/init.go | |
parent | 30587fb27b73fdb3f0aab1a78844edcaaae1c3bb (diff) |
[feat] reset error
Diffstat (limited to 'pkg/backend/init.go')
-rw-r--r-- | pkg/backend/init.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/backend/init.go b/pkg/backend/init.go index bae9b9b..af43bab 100644 --- a/pkg/backend/init.go +++ b/pkg/backend/init.go @@ -34,11 +34,19 @@ func initializeContext(opts *InitOpts) { func checkErrors(errCh chan string) { for { err := <-errCh + // TODO consider a queue instead ctx.Errors = err go trigger(OnStatusChanged) } } +func resetErrors(errname string) { + if ctx.Errors == errname { + ctx.Errors = "" + log.Println("DEBUG: reset error", errname) + } +} + func initializeBitmask(errCh chan string, opts *InitOpts) { if ctx == nil { log.Println("bug: cannot initialize bitmask, ctx is nil!") |