Golint cleanup pkg/utils/crypto/keys

This commit is contained in:
Harshavardhana
2015-03-05 20:08:29 -08:00
parent b33e2d2f9b
commit 66e31445ff
6 changed files with 20 additions and 36 deletions

View File

@@ -16,9 +16,10 @@
package keys
// AccessID and SecretID length in bytes
const (
MINIO_ACCESS_ID = 20
MINIO_SECRET_ID = 40
MinioAccessID = 20
MinioSecretID = 40
)
/// helpers
@@ -28,8 +29,8 @@ func isalnum(c byte) bool {
return '0' <= c && c <= '9' || 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z'
}
// validate access key for only alphanumeric characters
func ValidateAccessKey(key []byte) bool {
// IsValidAccessKey - validate access key for only alphanumeric characters
func IsValidAccessKey(key []byte) bool {
for _, char := range key {
if isalnum(char) {
continue