diff options
Diffstat (limited to 'spec/util.go')
-rw-r--r-- | spec/util.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/spec/util.go b/spec/util.go deleted file mode 100644 index 56e9121..0000000 --- a/spec/util.go +++ /dev/null @@ -1,21 +0,0 @@ -package spec - -import "strings" - -var rep = strings.NewReplacer( - `.`, `\.`, - `*`, `\*`, - `+`, `\+`, - `?`, `\?`, - `|`, `\|`, - `(`, `\(`, - `)`, `\)`, - `[`, `\[`, - `\`, `\\`, -) - -// EscapePattern escapes the special characters. -// For example, EscapePattern(`+`) returns `\+`. -func EscapePattern(s string) string { - return rep.Replace(s) -} |