1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Revert "Make staticcheck more strict and fix new warnings"

This reverts commit 5c456e2513.
This commit is contained in:
Tom Limoncelli
2022-02-11 11:14:46 -05:00
parent a70354775e
commit f9c4887d95
16 changed files with 107 additions and 115 deletions

View File

@@ -181,9 +181,7 @@ func getCertInfo(pemBytes []byte) (names []string, remaining float64, err error)
if err != nil {
return nil, 0, err
}
//lint:ignore S1024 I think this would be
// I think that would be this code but without unit tests I don't want to risk it:
// var daysLeft = float64(time.Until(cert.NotAfter)) / float64(time.Hour*24)
// FIXME(tlim): should use time.Until instead of t.Sub(time.Now()) (S1024)
var daysLeft = float64(cert.NotAfter.Sub(time.Now())) / float64(time.Hour*24)
return cert.DNSNames, daysLeft, nil
}