From 4e7b725a88ed1ad19cc67cbbbb46f3702c3bee97 Mon Sep 17 00:00:00 2001 From: hhvn Date: Sat, 27 Jan 2024 16:53:24 +0000 Subject: register() in statuses: handle errs and start goroutine --- status/01-bat.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'status/01-bat.go') diff --git a/status/01-bat.go b/status/01-bat.go index 5eb9295..85643f1 100644 --- a/status/01-bat.go +++ b/status/01-bat.go @@ -94,12 +94,5 @@ func bat(name string) error { } func init() { - name := "bat" - register(name) - - go func(){ - for { - checkError(name, bat(name)) - } - }() + register("bat", bat) } -- cgit v1.2.3