From 8f923f5d4a3755ae61358426720fe2bedbb9182c Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Fri, 17 Nov 2023 16:48:37 +0000 Subject: [PATCH] Avoid time.Compare It looks like the github action build environment for this repo uses a go 1.19.x environment which does not have time.Compare(). Replace with time.Before() and time.After() instead. --- billing_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/billing_test.go b/billing_test.go index 339ee4d54..1ed7afba8 100644 --- a/billing_test.go +++ b/billing_test.go @@ -56,11 +56,11 @@ func TestBillingUsageSessKey(t *testing.T) { resp.TotalUsage) } for idx, dc := range resp.DailyCosts { - if dc.Time.Compare(startDate) < 0 { + if dc.Time.Before(startDate) { t.Errorf("expected daily cost%v date(%v) before start date %v", idx, dc.Time, TestStartDate) } - if dc.Time.Compare(endDate) > 0 { + if dc.Time.After(endDate) { t.Errorf("expected daily cost%v date(%v) after end date %v", idx, dc.Time, TestEndDate) }