summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-07-02 14:14:22 +0100
committerPaul Buetow <pbuetow@mimecast.com>2020-07-02 14:14:22 +0100
commit27824a01dfd5e5cf2d77ab90a23e209c9851d91a (patch)
tree0dcb8e7523089fdd2a3747e26b92cfab9f714bb2 /internal
parent41fb325372034c7a42bf0157cdc08894d8371247 (diff)
better $line data handling
Diffstat (limited to 'internal')
-rw-r--r--internal/mapr/client/aggregate.go4
-rw-r--r--internal/mapr/wherecondition.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/internal/mapr/client/aggregate.go b/internal/mapr/client/aggregate.go
index fd3a899..e7fcdc6 100644
--- a/internal/mapr/client/aggregate.go
+++ b/internal/mapr/client/aggregate.go
@@ -71,8 +71,8 @@ func (a *Aggregate) makeFields(parts []string) map[string]string {
fields := make(map[string]string, len(parts))
for _, part := range parts {
- kv := strings.Split(part, "=")
- if len(kv) != 2 {
+ kv := strings.SplitN(part, "=", 2)
+ if len(kv) < 2 {
continue
}
if kv[0] == "$line" {
diff --git a/internal/mapr/wherecondition.go b/internal/mapr/wherecondition.go
index ab46bed..5ca3c44 100644
--- a/internal/mapr/wherecondition.go
+++ b/internal/mapr/wherecondition.go
@@ -3,9 +3,10 @@ package mapr
import (
"errors"
"fmt"
- "github.com/mimecast/dtail/internal/io/logger"
"strconv"
"strings"
+
+ "github.com/mimecast/dtail/internal/io/logger"
)
// QueryOperation determines the mapreduce operation.