include the operator in the 'unexpected operator' error message
package analyzer
import (
+ "fmt"
"path/filepath"
"regexp"
"strconv"
@@ -215,7 +216,7 @@ func compareRegex(conditional string, foundMatches map[string]string) (bool, err
} else {
// all we can support is "=" and "==" and "===" for now
if operator != "=" && operator != "==" && operator != "===" {
- return false, errors.New("unexpected operator in regex comparator")
+ return false, fmt.Errorf("unexpected operator %q in regex comparator", operator)
}
return foundValue == lookForValue, nil
