chore: fix linter warnings
This commit is contained in:
parent
8eedd38a54
commit
0290ef59b6
2 changed files with 1 additions and 5 deletions
cmd/sslcert
|
@ -159,7 +159,6 @@ type programFlags struct {
|
|||
type checkProgram struct {
|
||||
programFlags // Flags from the command line
|
||||
plugin *plugin.Plugin // Plugin output state
|
||||
getter certGetter // Certificate getter
|
||||
certificate *x509.Certificate // X.509 certificate from the server
|
||||
}
|
||||
|
||||
|
@ -338,7 +337,7 @@ func (program *checkProgram) RunCheck() {
|
|||
if err != nil {
|
||||
program.plugin.SetState(plugin.UNKNOWN, err.Error())
|
||||
} else if program.checkNames() {
|
||||
timeLeft := program.certificate.NotAfter.Sub(time.Now())
|
||||
timeLeft := time.Until(program.certificate.NotAfter)
|
||||
tlDays := int((timeLeft + 86399*time.Second) / (24 * time.Hour))
|
||||
program.plugin.SetState(program.checkCertificateExpiry(tlDays))
|
||||
program.setPerfData(tlDays)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue