From ec83d2780491159c4425ee1a5816c2bd4d6e6245 Mon Sep 17 00:00:00 2001 From: hhvn Date: Sat, 30 Dec 2023 14:16:56 +0000 Subject: Make bar run state.GetMon itself --- status/02-cpu.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'status/02-cpu.go') diff --git a/status/02-cpu.go b/status/02-cpu.go index e00d74f..a7b97cf 100644 --- a/status/02-cpu.go +++ b/status/02-cpu.go @@ -37,8 +37,9 @@ func getcpus(c chan [][]string, e chan error) { c <- ret - // This is only used if ret == nil - e <- errors.New("apparently this computer has no cores") + if ret == nil { + e <- errors.New("apparently this computer has no cores") + } } func cpu(name string) error { -- cgit v1.2.3