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/02-cpu.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'status/02-cpu.go') diff --git a/status/02-cpu.go b/status/02-cpu.go index a7b97cf..f67d908 100644 --- a/status/02-cpu.go +++ b/status/02-cpu.go @@ -132,12 +132,5 @@ func cpu(name string) error { } func init() { - name := "cpu" - register(name) - - go func(){ - for { - checkError(name, cpu(name)) - } - }() + register("cpu", cpu) } -- cgit v1.2.3