fix(/internal/policy/regexp.go): split regexp policy into strings only
Signed-off-by: maxgio92 <massimiliano.giovagnoli.1992@gmail.com>pull/597/head
parent
5181df4810
commit
9b1d37faf8
|
@ -14,7 +14,7 @@ type RegexpPolicy struct {
|
|||
|
||||
func NewRegexpPolicy(policy string) (*RegexpPolicy, error) {
|
||||
if strings.Contains(policy, ":") {
|
||||
parts := strings.Split(policy, ":")
|
||||
parts := strings.SplitN(policy, ":", 2)
|
||||
if len(parts) == 2 {
|
||||
|
||||
rx, err := regexp.Compile(parts[1])
|
||||
|
|
Loading…
Reference in New Issue