diff options
| author | Paul Buetow <35781042+pbuetow@users.noreply.github.com> | 2021-03-29 17:49:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-29 17:49:16 +0100 |
| commit | 9a467da883976c74d231ea9c7773430f583bab98 (patch) | |
| tree | 4e75a996ef44bc5adc771c318753b0c4ad934269 /internal/clients/tailclient.go | |
| parent | e811d1725ee5f931ece6fac01db70227b0fc8a7a (diff) | |
| parent | 93fce245564ffde20c3e5113757bc65672f69ed5 (diff) | |
Merge pull request #22 from snonux/develop
Add context awareness to dgrep
Diffstat (limited to 'internal/clients/tailclient.go')
| -rw-r--r-- | internal/clients/tailclient.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/clients/tailclient.go b/internal/clients/tailclient.go index cefbaa7..853ef1d 100644 --- a/internal/clients/tailclient.go +++ b/internal/clients/tailclient.go @@ -37,10 +37,10 @@ func (c TailClient) makeHandler(server string) handlers.Handler { return handlers.NewClientHandler(server) } -func (c TailClient) makeCommands() (commands []string) { - options := fmt.Sprintf("quiet=%v", c.Args.Quiet) +func (c TailClient) makeCommands(options map[string]string) (commands []string) { + optionsStr := c.commandOptionsToString(options) for _, file := range strings.Split(c.What, ",") { - commands = append(commands, fmt.Sprintf("%s:%s %s %s", c.Mode.String(), options, file, c.Regex.Serialize())) + commands = append(commands, fmt.Sprintf("%s:%s %s %s", c.Mode.String(), optionsStr, file, c.Regex.Serialize())) } logger.Debug(commands) |
