]> Sergey Matveev's repositories - path-extractor.git/blobdiff - validators.go
Small refactor
[path-extractor.git] / validators.go
index 042862c2c77c131db800d58a96e7152d50758931..fe2156d3330572b6c612a18add76cda06ffbe8b6 100644 (file)
@@ -52,7 +52,7 @@ func replaceGitPath(input string) string {
 }
 
 func isVersion(input string) bool {
-       r := regexp.MustCompile("[0-9x]\\.[0-9x]{1,2}(\\.[0-9x]{1,3})?")
+       r := regexp.MustCompile("^v?[0-9x]\\.[0-9x]{1,2}(\\.[0-9x]{1,3})?$")
        return r.Match([]byte(input))
 }