From d4eba2ba44bb3ccf22f33d227266145051668d6f Mon Sep 17 00:00:00 2001 From: Thomas Bennett Date: Sun, 15 May 2016 11:47:27 -0700 Subject: [PATCH] updated regex to be more concise --- halo/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/halo/http.go b/halo/http.go index a3238cf..2c26fc7 100644 --- a/halo/http.go +++ b/halo/http.go @@ -54,7 +54,7 @@ func (h *Halo) sendRequest(url string) ([]byte, error) { } func verifyValidID(id string) error { - re, _ := regexp.Compile("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$") + re, _ := regexp.Compile("^\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12}$") if !re.MatchString(id) { return fmt.Errorf("Not a Valid id: ", id) }