From 38f4733efc322f10eda7800259a95d682139592a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 11 Dec 2024 16:26:16 -0300 Subject: Consolidate packages spread across multiple files into single one --- src/urubu/spec/grammar/util.go | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 src/urubu/spec/grammar/util.go (limited to 'src/urubu/spec/grammar/util.go') diff --git a/src/urubu/spec/grammar/util.go b/src/urubu/spec/grammar/util.go deleted file mode 100644 index bf3f233..0000000 --- a/src/urubu/spec/grammar/util.go +++ /dev/null @@ -1,21 +0,0 @@ -package grammar - -import "strings" - -var rep = strings.NewReplacer( - `.`, `\.`, - `*`, `\*`, - `+`, `\+`, - `?`, `\?`, - `|`, `\|`, - `(`, `\(`, - `)`, `\)`, - `[`, `\[`, - `\`, `\\`, -) - -// EscapePattern escapes the special characters. -// For example, EscapePattern(`+`) returns `\+`. -func EscapePattern(s string) string { - return rep.Replace(s) -} -- cgit v1.2.3