From 6856e1821d4456135351c4b9b0e2737de0b76de8 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 9 Nov 2021 09:12:49 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B:=20Target.GroupBy=20should=20be=20?= =?UTF-8?q?singular=20in=20the=20type=20declaration=20(#180)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * GroupBy should be singular in the JSON * fix json declaration for groupBy Co-authored-by: Tank --- panel.go | 2 +- panel_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panel.go b/panel.go index 0c5c93c7..f85270fa 100644 --- a/panel.go +++ b/panel.go @@ -566,7 +566,7 @@ type Target struct { CrossSeriesReducer string `json:"crossSeriesReducer,omitempty"` PerSeriesAligner string `json:"perSeriesAligner,omitempty"` ValueType string `json:"valueType,omitempty"` - GroupBys []string `json:"groupBys,omitempty"` + GroupBy []string `json:"groupBy,omitempty"` Tags []struct { Key string `json:"key,omitempty"` Operator string `json:"operator,omitempty"` diff --git a/panel_test.go b/panel_test.go index 1d2b7004..efe7b4d1 100644 --- a/panel_test.go +++ b/panel_test.go @@ -630,7 +630,7 @@ func TestPanel_Stackdriver_ParsedTargets(t *testing.T) { "=", "some_subscription_id" ], - "groupBys": [], + "groupBy": [], "metricKind": "DELTA", "metricType": "pubsub.googleapis.com/subscription/ack_message_count", "perSeriesAligner": "ALIGN_DELTA",