diff --git a/access-key.go b/access-key.go index 2e141e645..a4d2a1aea 100644 --- a/access-key.go +++ b/access-key.go @@ -44,10 +44,10 @@ const ( ) // isValidSecretKey - validate secret key. -var isValidSecretKey = regexp.MustCompile("^.{8,40}$") +var isValidSecretKey = regexp.MustCompile(`^.{8,40}$`) // isValidAccessKey - validate access key. -var isValidAccessKey = regexp.MustCompile("^[a-zA-Z0-9\\-\\.\\_\\~]{5,20}$") +var isValidAccessKey = regexp.MustCompile(`^[a-zA-Z0-9\\-\\.\\_\\~]{5,20}$`) // mustGenAccessKeys - must generate access credentials. func mustGenAccessKeys() (creds credential) { diff --git a/globals.go b/globals.go index 94aec79d4..78d71308d 100644 --- a/globals.go +++ b/globals.go @@ -56,7 +56,7 @@ func setGlobals(quiet, debug bool) { globalQuiet = quiet globalDebug = debug // Enable debug messages if requested. - if globalDebug == true { + if globalDebug { console.DebugPrint = true } } diff --git a/pkg/disk/type_darwin.go b/pkg/disk/type_darwin.go index b673b7033..c000e1a08 100644 --- a/pkg/disk/type_darwin.go +++ b/pkg/disk/type_darwin.go @@ -37,7 +37,7 @@ func getFSType(path string) (string, error) { } fsTypeHex := strconv.FormatUint(uint64(s.Type), 16) fsTypeString, ok := fsType2StringMap[fsTypeHex] - if ok == false { + if !ok { return "UNKNOWN", nil } return fsTypeString, nil diff --git a/utils.go b/utils.go index b473fa35f..59336edfb 100644 --- a/utils.go +++ b/utils.go @@ -40,10 +40,7 @@ const ( // isMaxObjectSize - verify if max object size func isMaxObjectSize(size int64) bool { - if size > maxObjectSize { - return true - } - return false + return size > maxObjectSize } func contains(stringList []string, element string) bool {