summaryrefslogtreecommitdiff
path: root/internal/clients/maprclient.go
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2020-12-26 11:44:31 +0000
committerPaul Buetow <git@mx.buetow.org>2020-12-26 11:44:31 +0000
commit60fa324cd5296b088c24d8db1d334a25ca955788 (patch)
tree88c14b39b66f5273cebf96307c86293b178cce40 /internal/clients/maprclient.go
parentab676c2b484225ed22765b23d8f0545088ecd610 (diff)
initial spartan mode support
Diffstat (limited to 'internal/clients/maprclient.go')
-rw-r--r--internal/clients/maprclient.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/clients/maprclient.go b/internal/clients/maprclient.go
index 6aadd6b..d201d40 100644
--- a/internal/clients/maprclient.go
+++ b/internal/clients/maprclient.go
@@ -112,6 +112,7 @@ func (c MaprClient) makeHandler(server string) handlers.Handler {
func (c MaprClient) makeCommands() (commands []string) {
commands = append(commands, fmt.Sprintf("map %s", c.query.RawQuery))
+ options := fmt.Sprintf("spartan=%v", c.Args.Spartan)
modeStr := "cat"
if c.Mode == omode.TailClient {
@@ -123,7 +124,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 %s", modeStr, file, c.Regex.Serialize()))
+ commands = append(commands, fmt.Sprintf("%s:%s %s %s", modeStr, options, file, c.Regex.Serialize()))
}
return