diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-02-06 18:09:39 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2017-02-06 18:09:39 -0500 |
commit | 74fa9411545e30c64c75eae0b2b1dfccd8741a2f (patch) | |
tree | ae1632bc91d0ed0246e88475297327ef0c7d6fe3 | |
parent | e45ff32aca748b05e0f000daa7536b058d2da089 (diff) |
gofmt
-rw-r--r-- | diff.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -19,15 +19,15 @@ func handleErr(err error, str string, a ...interface{}) { } type Cert struct { - Url string - X509 *x509.Certificate + Url string + X509 *x509.Certificate } func (cert Cert) WriteTo(w io.Writer, action string) error { block := pem.Block{ Type: "CERTIFICATE", Headers: map[string]string{ - "X-Crt-Sh-Url": cert.Url, + "X-Crt-Sh-Url": cert.Url, "X-Diff-Action": action, }, Bytes: cert.X509.Raw, @@ -83,7 +83,7 @@ func readCrtSh(filename string, hosts []string) (map[string]Cert, error) { if certX509.VerifyHostname(host) == nil { if old, haveold := ret[host]; !haveold || certX509.NotBefore.After(old.X509.NotBefore) { ret[host] = Cert{ - Url: certPem.Headers["X-Crt-Sh-Url"], + Url: certPem.Headers["X-Crt-Sh-Url"], X509: certX509, } } @@ -120,7 +120,7 @@ func main() { if !haveCrtSh { handleErr(certTLS.WriteTo(os.Stdout, "del"), "Could not encode PEM: %v\n") - } else if ! certTLS.X509.Equal(certCrtSh.X509) { + } else if !certTLS.X509.Equal(certCrtSh.X509) { handleErr(certTLS.WriteTo(os.Stdout, "del"), "Could not encode PEM: %v\n") handleErr(certCrtSh.WriteTo(os.Stdout, "add"), "Could not encode PEM: %v\n") } else { |