From b605b84d328af2e4923cdef856187909e191b896 Mon Sep 17 00:00:00 2001
From: Tamer Tas <contact@tmrts.com>
Date: Mon, 27 Feb 2017 12:10:17 +0300
Subject: [PATCH] pkg/host: refactor zipURL calculation

---
 pkg/host/github.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkg/host/github.go b/pkg/host/github.go
index bc31971..9265a3c 100644
--- a/pkg/host/github.go
+++ b/pkg/host/github.go
@@ -13,14 +13,14 @@ func ZipURL(repo string) string {
 
 	repo = strings.TrimSuffix(strings.TrimPrefix(repo, "/"), "/")
 
-	zipRegex, _ := regexp.Compile(`zip/(\S+)$`)
+	zipRegex := regexp.MustCompile(`zip/(\S+)$`)
 	if zipRegex.MatchString(repo) {
 		return repo
 	}
 
-	// So this could identify a port number, but since we only support github
-	// I don't believe using it as a version modifier is a problem. Though
-	// perhaps we should use something else instead?
+	// FIXME(tmrts): this check could also identify a port number, but since
+	// we only support github I don't believe using it as a version modifier
+	// is a problem. Perhaps we should reconsider?
 	if strings.Contains(repo, ":") {
 		parts := strings.SplitAfter(repo, ":")
 
-- 
GitLab