From 27824a01dfd5e5cf2d77ab90a23e209c9851d91a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 2 Jul 2020 14:14:22 +0100 Subject: better $line data handling --- internal/mapr/client/aggregate.go | 4 ++-- internal/mapr/wherecondition.go | 3 ++- 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. -- cgit v1.2.3