diff options
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/clients/maprclient.go | 2 | ||||
| -rw-r--r-- | internal/regex/regex.go | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/internal/clients/maprclient.go b/internal/clients/maprclient.go index 581db44..149129d 100644 --- a/internal/clients/maprclient.go +++ b/internal/clients/maprclient.go @@ -123,7 +123,7 @@ func (c MaprClient) makeCommands() (commands []string) { commands = append(commands, fmt.Sprintf("timeout %d %s %s %s", c.Timeout, modeStr, file, c.Regex.Serialize())) continue } - commands = append(commands, fmt.Sprintf("%s %s regex %s", modeStr, file, c.Regex.Serialize())) + commands = append(commands, fmt.Sprintf("%s %s %s", modeStr, file, c.Regex.Serialize())) } return diff --git a/internal/regex/regex.go b/internal/regex/regex.go index 707cb48..f668c38 100644 --- a/internal/regex/regex.go +++ b/internal/regex/regex.go @@ -39,6 +39,10 @@ func New(regexStr string, flag Flag) (Regex, error) { } func new(regexStr string, flags []Flag) (Regex, error) { + if len(flags) == 0 { + flags = append(flags, Default) + } + r := Regex{ regexStr: regexStr, flags: flags, |
