From 18a4de2bb288d44c4e5a7560fced7a15e9a6469d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 5 Feb 2021 09:02:14 +0000 Subject: add --max, --before, --after switches to dtail and dgrep commands --- internal/clients/tailclient.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/clients/tailclient.go') 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) -- cgit v1.2.3