Skip to content

Commit

Permalink
convert timestamps to pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
encbladexp committed Sep 28, 2024
1 parent e409d21 commit fb35167
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down

0 comments on commit fb35167

Please sign in to comment.