From 2b6d0754ed64dac0b54891a965a893ef5540c927 Mon Sep 17 00:00:00 2001 From: Aidan Date: Thu, 6 Jun 2024 12:42:03 +1200 Subject: [PATCH] Comments --- host/host_aix.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/host/host_aix.go b/host/host_aix.go index b1eb4608f..55b5fbfed 100644 --- a/host/host_aix.go +++ b/host/host_aix.go @@ -78,11 +78,13 @@ func UptimeWithContext(ctx context.Context) (uint64, error) { return 0, fmt.Errorf("expected 'hours:minutes,' format but got '%s'", ut[4]) } + // Parse hours hours, err = strconv.ParseUint(hm[0], 10, 64) if err != nil { return 0, err } + // Remove trailing comma from minutes and parse minutes, err = strconv.ParseUint(strings.Replace(hm[1], ",", "", -1), 10, 64) if err != nil { return 0, err