From fb35167f1f4bdfed4fdb1627f49fbff56fafa951 Mon Sep 17 00:00:00 2001 From: "Stefan J. Betz" Date: Sat, 28 Sep 2024 20:42:59 +0200 Subject: [PATCH] convert timestamps to pointers --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index f0f837a..c1dd097 100644 --- a/main.go +++ b/main.go @@ -20,8 +20,8 @@ const ( type Certificate struct { Status string - Expired time.Time - Revoked time.Time + Expired *time.Time + Revoked *time.Time Serial string Filename string CN string @@ -45,14 +45,14 @@ func (c *Certificates) process_line(line []string) { if err != nil { panic(err) } - cert.Expired = *expired + cert.Expired = expired revoked_string := line[CERT_REVOKED] if revoked_string != "" { revoked, err := c.parse_time(line[CERT_REVOKED]) if err != nil { panic(err) } - cert.Revoked = *revoked + cert.Revoked = revoked } cert.Status = line[CERT_STATUS] cert.Filename = line[CERT_FILENAME]