From 9dbebcf46eb3874e728ff2e3b7380fb41e577f42 Mon Sep 17 00:00:00 2001 From: Ben Aldrich Date: Wed, 1 Jun 2016 16:03:11 -0600 Subject: [PATCH] rename ALL to all --- cpu/cpu_unix.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu/cpu_unix.go b/cpu/cpu_unix.go index 4bdf3b7..0ed7d62 100644 --- a/cpu/cpu_unix.go +++ b/cpu/cpu_unix.go @@ -26,7 +26,7 @@ func calculateBusy(t1, t2 TimesStat) float64 { return (t2Busy - t1Busy) / (t2All - t1All) * 100 } -func calculateALLBusy(t1, t2 []TimesStat) ([]float64, error) { +func calculateAllBusy(t1, t2 []TimesStat) ([]float64, error) { // Make sure the CPU measurements have the same length. if len(t1) != len(t2) { return nil, fmt.Errorf( @@ -63,7 +63,7 @@ func Percent(interval time.Duration, percpu bool) ([]float64, error) { return nil, err } - return calculateALLBusy(cpuTimes1, cpuTimes2) + return calculateAllBusy(cpuTimes1, cpuTimes2) } func percentUsedFromLastCall(percpu bool) ([]float64, error) { @@ -85,6 +85,6 @@ func percentUsedFromLastCall(percpu bool) ([]float64, error) { if lastTimes == nil { return nil, fmt.Errorf("Error getting times for cpu percent. LastTimes was nil") } - return calculateALLBusy(lastTimes, cpuTimes) + return calculateAllBusy(lastTimes, cpuTimes) }