Regex cleanup

This commit is contained in:
Héctor Giménez
2023-03-11 19:43:42 +09:00
parent d71894a044
commit 73978a702c

View File

@@ -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) {