From 33daa8540c4035c1c4939578bace0e8b960599aa Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 19 Nov 2016 12:36:57 -0500 Subject: tidy output --- diff.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'diff.go') diff --git a/diff.go b/diff.go index 25c9028..59e7625 100644 --- a/diff.go +++ b/diff.go @@ -81,7 +81,7 @@ func keys(m map[string]*x509.Certificate) []string { } func fmtCert(cert *x509.Certificate) string { - return fmt.Sprintf("%s %s %s", + return fmt.Sprintf("%s\t%s\t%s", cert.Subject.CommonName, cert.NotBefore.Format("2006-01-02 15:04:05 MST(-07)"), cert.NotAfter.Format("2006-01-02 15:04:05 MST(-07)")) @@ -104,12 +104,12 @@ func main() { certTLS := certsTLS[host] certCrtSh, okCrtSh := certsCrtSh[host] if !okCrtSh { - fmt.Printf("-%s %s\n", host, fmtCert(certTLS)) + fmt.Printf("-%s\t%s\n", host, fmtCert(certTLS)) } else if !certTLS.Equal(certCrtSh) { - fmt.Printf("-%s %s\n", host, fmtCert(certTLS)) - fmt.Printf("+%s %s\n", host, fmtCert(certCrtSh)) + fmt.Printf("-%s\t%s\n", host, fmtCert(certTLS)) + fmt.Printf("+%s\t%s\n", host, fmtCert(certCrtSh)) } else { - fmt.Printf(" %s %s\n", host, fmtCert(certTLS)) + fmt.Printf(" %s\t%s\n", host, fmtCert(certTLS)) } } } -- cgit v1.2.3-2-g168b