From 02b9f479290ed92d8b7f6313b1d7a5870df0e4ab Mon Sep 17 00:00:00 2001 From: Josh Liburdi Date: Sun, 22 Jan 2023 23:43:29 +0000 Subject: [PATCH 1/4] fix: named_group opt --- process/capture.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process/capture.go b/process/capture.go index 79fa9909..1bb72a9a 100644 --- a/process/capture.go +++ b/process/capture.go @@ -28,7 +28,7 @@ type procCaptureOptions struct { // // - find_all: applies the FindAll(String)?Submatch function (see count) // - // - namedprocGroup: applies the Find(String)?Submatch function and stores + // - named_group: applies the Find(String)?Submatch function and stores // values as objects using subexpressions Type string `json:"type"` // Count manages the number of repeated capture groups. @@ -106,7 +106,7 @@ func (p procCapture) Apply(ctx context.Context, capsule config.Capsule) (config. capsule.SetData(match[1]) return capsule, nil - case "namedprocGroup": + case "named_group": newCapsule := config.NewCapsule() names := re.SubexpNames() From 78c300ad96643babb4710d734579dd9ee3eca617 Mon Sep 17 00:00:00 2001 From: Josh Liburdi Date: Sun, 22 Jan 2023 23:43:37 +0000 Subject: [PATCH 2/4] fix: key opt --- process/aggregate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/aggregate.go b/process/aggregate.go index 57a80565..fe89fb19 100644 --- a/process/aggregate.go +++ b/process/aggregate.go @@ -41,7 +41,7 @@ type procAggregateOptions struct { // // This is only used when handling objects and defaults to an // empty string. - Key string `json:"aggregate_key"` + Key string `json:"key"` // Separator is the string that joins aggregated data. // // This is only used when handling data and defaults to an empty From cd3c2312cd3c1aae4e4f6adfc36a2f89c62eb30a Mon Sep 17 00:00:00 2001 From: Josh Liburdi Date: Sun, 22 Jan 2023 23:51:03 +0000 Subject: [PATCH 3/4] test: cap test --- process/capture_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/capture_test.go b/process/capture_test.go index b285192c..82f2649e 100644 --- a/process/capture_test.go +++ b/process/capture_test.go @@ -64,7 +64,7 @@ var captureTests = []struct { "namedprocGroup", procCapture{ Options: procCaptureOptions{ - Type: "namedprocGroup", + Type: "named_group", Expression: "(?P[a-zA-Z]+) (?P[a-zA-Z]+)", }, }, From bd4ef789b9d62e4d7d2bd5f0b28f1314b88a4444 Mon Sep 17 00:00:00 2001 From: Josh Liburdi Date: Sun, 22 Jan 2023 23:51:34 +0000 Subject: [PATCH 4/4] docs: test name --- process/capture_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/capture_test.go b/process/capture_test.go index 82f2649e..e2257f98 100644 --- a/process/capture_test.go +++ b/process/capture_test.go @@ -61,7 +61,7 @@ var captureTests = []struct { nil, }, { - "namedprocGroup", + "named_group", procCapture{ Options: procCaptureOptions{ Type: "named_group",