Skip to content

Commit

Permalink
cleanup deadcode
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Mar 11, 2018
1 parent 107c3d9 commit 94864c6
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func createHost(name string, twarn time.Time, cert *x509.Certificate) host {
if twarn.After(cert.NotAfter) {
host.warn = true
}
expiresIn := int64(cert.NotAfter.Sub(time.Now()).Hours())
expiresIn := int64(time.Until(cert.NotAfter).Hours())
if expiresIn <= 48 {
host.expires = fmt.Sprintf("%d hours", expiresIn)
} else {
Expand All @@ -234,13 +234,3 @@ func createHost(name string, twarn time.Time, cert *x509.Certificate) host {

return host
}

func usageAndExit(message string, exitCode int) {
if message != "" {
fmt.Fprintf(os.Stderr, message)
fmt.Fprintf(os.Stderr, "\n\n")
}
flag.Usage()
fmt.Fprintf(os.Stderr, "\n")
os.Exit(exitCode)
}

0 comments on commit 94864c6

Please sign in to comment.