Regex cleanup
This commit is contained in:
@@ -9,9 +9,9 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
errEmptyLine = errors.New("empty line")
|
errEmptyLine = errors.New("empty line")
|
||||||
operandRegex = regexp.MustCompile("(\\|{2}|\\&{2})")
|
operandRegex = regexp.MustCompile(`(\|{2}|\&{2})`)
|
||||||
comparableRegex = regexp.MustCompile("(\\={2}|\\<\\=|\\>\\=|\\>|\\<|\\!\\=)")
|
comparableRegex = regexp.MustCompile(`(\={2}|\<\=|\>\=|\>|\<|\!\=)`)
|
||||||
propertyNameRegex = regexp.MustCompile("\\[(.*)\\]")
|
propertyNameRegex = regexp.MustCompile(`\[(.*)\]`)
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseLine(line string) (Rule, error) {
|
func parseLine(line string) (Rule, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user