gofmt changes (new)

Formatting in 'utils/machine/machine.go' and
'utils/sysfs/sysfs.go' was incorrect and causing ./build/presubmit.sh
script to fail in Travis giving below error:
The following files are not properly formatted:
$ ./build/presubmit.sh
+./build/check_gofmt.sh .
utils/machine/machine.go utils/sysfs/sysfs.go utils/machine/machine.go
utils/sysfs/sysfs.go

Fixed the formatting using below command:
gofmt -l -w -s utils/sysfs/sysfs.go
gofmt -l -w -s utils/machine/machine.go
This commit is contained in:
shahidhs-ibm 2015-10-19 17:13:09 +05:30
parent be8de942e7
commit 305bb279d8
2 changed files with 54 additions and 54 deletions

View File

@ -22,8 +22,8 @@ import (
"strings"
// s390/s390x changes
"syscall"
"runtime"
"syscall"
"github.com/golang/glog"
info "github.com/google/cadvisor/info/v1"
@ -44,7 +44,7 @@ var swapCapacityRegexp = regexp.MustCompile("SwapTotal: *([0-9]+) kB")
// GetClockSpeed returns the CPU clock speed, given a []byte formatted as the /proc/cpuinfo file.
func GetClockSpeed(procInfo []byte) (uint64, error) {
// s390/s390x changes
if (true == isSystemZ()) {
if true == isSystemZ() {
return 0, nil
}
@ -277,7 +277,7 @@ func getMachineArch() (string, error) {
func isSystemZ() bool {
arch, err := getMachineArch()
if err == nil {
if (true == strings.Contains(arch, "390")) {
if true == strings.Contains(arch, "390") {
return true
}
}