From 969552d4e9727ae127ab4645774de317d5fac842 Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 12 Mar 2019 01:12:28 +0100 Subject: [PATCH] go fmt --- canonical.go | 4 ++-- dkim_test.go | 2 +- query.go | 4 ++-- query_test.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/canonical.go b/canonical.go index 6d84f44..d25149d 100644 --- a/canonical.go +++ b/canonical.go @@ -9,8 +9,8 @@ import ( type Canonicalization string const ( - CanonicalizationSimple Canonicalization = "simple" - CanonicalizationRelaxed = "relaxed" + CanonicalizationSimple Canonicalization = "simple" + CanonicalizationRelaxed = "relaxed" ) type canonicalizer interface { diff --git a/dkim_test.go b/dkim_test.go index 5d5311c..1d1a361 100644 --- a/dkim_test.go +++ b/dkim_test.go @@ -30,7 +30,7 @@ GMot/L2x0IYyMLAz6oLWh2hm7zwtb0CgOrPo1ke44hFYnfc= const testEd25519PrivateKeyBase64 = "nWGxne/9WmC6hEr0kuwsxERJxWl7MmkZcDusAxyuf2A=" var ( - testPrivateKey *rsa.PrivateKey + testPrivateKey *rsa.PrivateKey testEd25519PrivateKey ed25519.PrivateKey ) diff --git a/query.go b/query.go index 83d03af..9c09b10 100644 --- a/query.go +++ b/query.go @@ -117,8 +117,8 @@ func parsePublicKey(s string) (*queryResult, error) { } // RFC 8301 section 3.2: verifiers MUST NOT consider signatures using // RSA keys of less than 1024 bits as valid signatures. - if rsaPub.Size() * 8 < 1024 { - return nil, permFailError(fmt.Sprintf("key is too short: want 1024 bits, has %v bits", rsaPub.Size() * 8)) + if rsaPub.Size()*8 < 1024 { + return nil, permFailError(fmt.Sprintf("key is too short: want 1024 bits, has %v bits", rsaPub.Size()*8)) } res.Verifier = rsaVerifier{rsaPub} res.KeyAlgo = "rsa" diff --git a/query_test.go b/query_test.go index d17860f..c94204b 100644 --- a/query_test.go +++ b/query_test.go @@ -18,7 +18,7 @@ func init() { func queryTest(domain, selector string) (*queryResult, error) { record := selector + "._domainkey." + domain - switch record { + switch record { case "brisbane._domainkey.example.com", "brisbane._domainkey.example.org", "test._domainkey.football.example.com": return parsePublicKey(dnsPublicKey) case "brisbane._domainkey.football.example.com":