From a8e97f35a572192764a07326c2ad6f0b1b4ee9c5 Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Mon, 20 Apr 2015 16:26:15 -0700 Subject: [PATCH] Removing unnecessary match --- auth.go | 1 - auth_test.go | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.go b/auth.go index f97d6a72..8ca2e451 100644 --- a/auth.go +++ b/auth.go @@ -27,6 +27,5 @@ func isValidSecretKey(secretAccessKey string) bool { // isValidAccessKey - validate access key func isValidAccessKey(accessKeyID string) bool { regex := regexp.MustCompile("^[A-Z0-9\\-\\.\\_\\~]{20}$") - regex.MatchString(accessKeyID) return regex.MatchString(accessKeyID) } diff --git a/auth_test.go b/auth_test.go index 337cb542..82284cad 100644 --- a/auth_test.go +++ b/auth_test.go @@ -35,6 +35,7 @@ func (s *AuthSuite) TestAuthAccessKeyLength(c *C) { result = isValidSecretKey("1234567890123456789012345678901234567890") c.Assert(result, Equals, true) } + func (s *AuthSuite) TestValidAccessKeyLength(c *C) { // short result := isValidAccessKey("1234567890123456789")