diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-09-04 17:23:21 +0300 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-09-04 17:23:21 +0300 |
| commit | edee62717fbe752556d702c029a5b39de1b04677 (patch) | |
| tree | e3c6d99d7a08e0005fd6340c664fb11912b89679 /internal/clients/catclient.go | |
| parent | c562a013ef7e40e3a7f6126a6d327552f2bc557f (diff) | |
fix regex bug
Diffstat (limited to 'internal/clients/catclient.go')
| -rw-r--r-- | internal/clients/catclient.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/clients/catclient.go b/internal/clients/catclient.go index f089e32..d8e9196 100644 --- a/internal/clients/catclient.go +++ b/internal/clients/catclient.go @@ -31,7 +31,8 @@ func NewCatClient(args Args) (*CatClient, error) { }, } - c.init(c) + c.init() + c.makeConnections(c) return &c, nil } @@ -42,7 +43,7 @@ func (c CatClient) makeHandler(server string) handlers.Handler { func (c CatClient) makeCommands() (commands []string) { for _, file := range strings.Split(c.What, ",") { - commands = append(commands, fmt.Sprintf("%s %s regex %s", c.Mode.String(), file, c.Regex)) + commands = append(commands, fmt.Sprintf("%s %s %s", c.Mode.String(), file, c.Regex.Serialize())) } return } |
