mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
minio: Simplify for gosimple
tool complaints.
This commit is contained in:
parent
ba3a5805c1
commit
6037fe66e9
@ -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) {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user