From: Edgar HIPP Date: Sun, 30 Aug 2015 15:06:49 +0000 (+0200) Subject: Update readme with installation method X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=f714a02e4f43b8fc43c46f33aed89db9f194c9aa;p=path-extractor.git Update readme with installation method --- diff --git a/.gitignore b/.gitignore index 3f008b9..7097f7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ pe *.txt demo.gif +path-extractor diff --git a/pe_test.go b/pe_test.go index 6545029..cc8ef4d 100644 --- a/pe_test.go +++ b/pe_test.go @@ -18,6 +18,11 @@ func TestGitIgnore(t *testing.T) { t.Errorf("Matches email adresses", output[0]) } + output = GetAllMatches("and/or") + if len(output) != 0 { + t.Errorf("Matches and/or adresses", output[0]) + } + output = GetAllMatches("v1.2") if len(output) != 0 { t.Errorf("Matches version number", output[0]) diff --git a/validators.go b/validators.go index cd9477d..cb09c40 100644 --- a/validators.go +++ b/validators.go @@ -38,7 +38,7 @@ func isVersion(input string) bool { } func containsInvalidString(input string) bool { - invalidStrings := []string{"(", ")", "@", "origin/", "{", "}", "<", ">", "$", "*"} + invalidStrings := []string{"(", ")", "@", "and/or", "origin/", "{", "}", "<", ">", "$", "*"} for _, s := range invalidStrings { if strings.Contains(input, s) { return true