From 33daa8540c4035c1c4939578bace0e8b960599aa Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 19 Nov 2016 12:36:57 -0500 Subject: tidy output --- crtsh-pem2html.go | 2 +- diff.go | 10 +++++----- tls-pem2html.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crtsh-pem2html.go b/crtsh-pem2html.go index b6effa4..ea54ae9 100644 --- a/crtsh-pem2html.go +++ b/crtsh-pem2html.go @@ -79,7 +79,7 @@ var tmpl = template.Must(template.New("pem2html"). 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)) } } } diff --git a/tls-pem2html.go b/tls-pem2html.go index a68a58a..9e8e80a 100644 --- a/tls-pem2html.go +++ b/tls-pem2html.go @@ -82,7 +82,7 @@ var tmpl = template.Must(template.New("pem2html").
-

Updated {{.now.Local.Format "2006-01-02 15:04:05"}}

+

CT log (Updated {{.now.Local.Format "2006-01-02 15:04:05"}})

Logged
-- cgit v1.2.3-2-g168b
-

Updated {{.now.Local.Format "2006-01-02 15:04:05"}}

+

Live Certs (Updated {{.now.Local.Format "2006-01-02 15:04:05"}})

NotBefore