8 func isGitRange(input string) bool {
9 r := regexp.MustCompile("[0-9a-f]{3,}\\.\\.[0-9a-f]{3,}")
10 return r.Match([]byte(input))
13 func isGitPath(input string) bool {
14 r := regexp.MustCompile("^[ab]/")
15 return r.Match([]byte(input))
18 func isDate(input string) bool {
19 r := regexp.MustCompile("^[0-9]+/[0-9]+/[0-9]+")
20 return r.Match([]byte(input))
23 func isGitInstruction(input string) bool {
24 r := regexp.MustCompile("\\.{3,}")
25 return r.Match([]byte(input))
28 func replaceGitPath(input string) string {
29 r := regexp.MustCompile("^[ab]/(.*)")
31 temp = r.FindSubmatch([]byte(input))
32 return string(temp[1])
35 func isVersion(input string) bool {
36 r := regexp.MustCompile("[0-9x]\\.[0-9x]{1,2}(\\.[0-9x]{1,3})?")
37 return r.Match([]byte(input))
40 func containsInvalidString(input string) bool {
41 invalidStrings := []string{"(", ")", "@", "origin/", "{", "}", "<", ">", "$", "*"}
42 for _, s := range invalidStrings {
43 if strings.Contains(input, s) {