6 func isGitRange (input string) bool {
7 r := regexp.MustCompile("[0-9a-f]{3,}\\.\\.[0-9a-f]{3,}")
8 return r.Match([]byte(input))
11 func isGitPath (input string) bool {
12 r := regexp.MustCompile("^[ab]/")
13 return r.Match([]byte(input))
16 func isDate (input string) bool {
17 r := regexp.MustCompile("^[0-9]+/[0-9]+/[0-9]+")
18 return r.Match([]byte(input))
21 func isGitInstruction (input string) bool {
22 r := regexp.MustCompile("\\.{3,}")
23 return r.Match([]byte(input))
26 func replaceGitPath (input string) string {
27 r := regexp.MustCompile("^[ab]/(.*)")
29 temp = r.FindSubmatch([]byte(input))
30 return string(temp[1])
33 func isVersion (input string) bool {
34 r := regexp.MustCompile("[0-9x]\\.[0-9x]{1,2}(\\.[0-9x]{1,3})?")
35 return r.Match([]byte(input))
38 func containsInvalidString (input string) bool {
39 invalidStrings := []string{"(",")","@","origin/","{","}","<",">","$","*"}
40 for _,s := range invalidStrings {
41 if strings.Contains(input,s) {