From adadee09f5eb40a78cd140370a4bf8a7cde105d4 Mon Sep 17 00:00:00 2001 From: mshen Date: Tue, 16 Aug 2022 17:55:45 -0400 Subject: [PATCH] Fix unmarshaling error with AlertGroupingParameters timeout Signed-off-by: mshen --- service.go | 2 +- service_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service.go b/service.go index 92066144..34040140 100644 --- a/service.go +++ b/service.go @@ -107,7 +107,7 @@ type AlertGroupingParameters struct { // AlertGroupParamsConfig is the config object on alert_grouping_parameters type AlertGroupParamsConfig struct { - Timeout uint `json:"timeout,omitempty"` + Timeout *uint `json:"timeout,omitempty"` Aggregate string `json:"aggregate,omitempty"` Fields []string `json:"fields,omitempty"` } diff --git a/service_test.go b/service_test.go index 2012626d..b8864519 100644 --- a/service_test.go +++ b/service_test.go @@ -179,7 +179,7 @@ func TestService_CreateWithAlertGroupParamsTime(t *testing.T) { AlertGroupingParameters: &AlertGroupingParameters{ Type: "time", Config: &AlertGroupParamsConfig{ - Timeout: 2, + Timeout: new(uint), }, }, }