summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-06 18:09:39 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-06 18:09:39 -0500
commit74fa9411545e30c64c75eae0b2b1dfccd8741a2f (patch)
treeae1632bc91d0ed0246e88475297327ef0c7d6fe3
parente45ff32aca748b05e0f000daa7536b058d2da089 (diff)
gofmt
-rw-r--r--diff.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/diff.go b/diff.go
index 83b1d2e..96947b6 100644
--- a/diff.go
+++ b/diff.go
@@ -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 {