From a8623f1162ad36521b2600cd98fb593079504438 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Sat, 1 Oct 2022 16:05:50 +0200 Subject: [PATCH] Fixed mixed pointer/copy assignment in ApiDate type --- breach.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/breach.go b/breach.go index 4ae83f4..cecfb76 100644 --- a/breach.go +++ b/breach.go @@ -213,8 +213,9 @@ func (d *ApiDate) UnmarshalJSON(s []byte) error { } // Time adds a Time() method to the ApiDate converted time.Time type -func (d ApiDate) Time() time.Time { - return time.Time(d) +func (d *ApiDate) Time() time.Time { + dp := *d + return time.Time(dp) } // setBreachOpts returns a map of default settings and overridden values from different BreachOption