Compare commits

...

4 Commits

@ -34,6 +34,7 @@ build_test: ## test only buildable
GOOS=netbsd go test ./... | $(BUILD_FAIL_PATTERN) GOOS=netbsd go test ./... | $(BUILD_FAIL_PATTERN)
GOOS=openbsd go test ./... | $(BUILD_FAIL_PATTERN) GOOS=openbsd go test ./... | $(BUILD_FAIL_PATTERN)
GOOS=plan9 go test ./... | $(BUILD_FAIL_PATTERN) GOOS=plan9 go test ./... | $(BUILD_FAIL_PATTERN)
CGO_ENABLED=0 GOOS=aix GOARCH=ppc64 go test ./... | $(BUILD_FAIL_PATTERN)
ifeq ($(shell uname -s), Darwin) ifeq ($(shell uname -s), Darwin)
CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN) CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
@ -77,6 +78,8 @@ vet:
GOOS=plan9 GOARCH=amd64 go vet ./... GOOS=plan9 GOARCH=amd64 go vet ./...
GOOS=plan9 GOARCH=386 go vet ./... GOOS=plan9 GOARCH=386 go vet ./...
CGO_ENABLED=0 GOOS=aix GOARCH=ppc64 go vet ./...
macos_test: macos_test:
CGO_ENABLED=0 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN) CGO_ENABLED=0 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN) CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)

@ -110,7 +110,7 @@ func parseUptime(uptime string) uint64 {
if err != nil { if err != nil {
return 0 return 0
} }
case ut[3] == "mins," || ut[3] == "mins,": case ut[3] == "mins,":
mins, err = strconv.ParseUint(ut[2], 10, 64) mins, err = strconv.ParseUint(ut[2], 10, 64)
if err != nil { if err != nil {
return 0 return 0

@ -30,7 +30,7 @@ func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat,
iocounters = append(iocounters, n) iocounters = append(iocounters, n)
} }
if pernic == false { if pernic == false {
return getIOCountersAll(iocounters) return getIOCountersAll(iocounters), nil
} }
return iocounters, nil return iocounters, nil
} }

@ -89,7 +89,7 @@ func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat,
return nil, err return nil, err
} }
if pernic == false { if pernic == false {
return getIOCountersAll(iocounters) return getIOCountersAll(iocounters), nil
} }
return iocounters, nil return iocounters, nil
} }

Loading…
Cancel
Save