chore: fix linter warnings

This commit is contained in:
Emmanuel BENOîT 2024-07-19 19:28:05 +02:00
parent 8eedd38a54
commit 0290ef59b6
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg
2 changed files with 1 additions and 5 deletions

View file

@ -159,7 +159,6 @@ type programFlags struct {
type checkProgram struct { type checkProgram struct {
programFlags // Flags from the command line programFlags // Flags from the command line
plugin *plugin.Plugin // Plugin output state plugin *plugin.Plugin // Plugin output state
getter certGetter // Certificate getter
certificate *x509.Certificate // X.509 certificate from the server certificate *x509.Certificate // X.509 certificate from the server
} }
@ -338,7 +337,7 @@ func (program *checkProgram) RunCheck() {
if err != nil { if err != nil {
program.plugin.SetState(plugin.UNKNOWN, err.Error()) program.plugin.SetState(plugin.UNKNOWN, err.Error())
} else if program.checkNames() { } 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)) tlDays := int((timeLeft + 86399*time.Second) / (24 * time.Hour))
program.plugin.SetState(program.checkCertificateExpiry(tlDays)) program.plugin.SetState(program.checkCertificateExpiry(tlDays))
program.setPerfData(tlDays) program.setPerfData(tlDays)

View file

@ -149,9 +149,6 @@ func (program *checkProgram) addRttPerf(name string, value time.Duration) {
program.plugin.AddPerfData(pd) program.plugin.AddPerfData(pd)
} }
func (program *checkProgram) addResponseInfo(server string, response queryResponse) {
}
// Add information about one of the servers' response to the plugin output. This includes // Add information about one of the servers' response to the plugin output. This includes
// the error message if the query failed or the RTT performance data if it succeeded. It // the error message if the query failed or the RTT performance data if it succeeded. It
// then attempts to extract the serial from a server's response and returns it if // then attempts to extract the serial from a server's response and returns it if