From 1a014be277db77b84a3f363c34a84ab244cd47de Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Fri, 24 Oct 2025 12:43:51 +0100 Subject: [PATCH] internal/dkim: Apply gofmt -s A run of `gofmt -s` found two instances where a struct definition could be simplified. This patch applies those suggestions. --- internal/dkim/sign_test.go | 4 ++-- internal/dkim/verify_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/dkim/sign_test.go b/internal/dkim/sign_test.go index 20505dc..641e043 100644 --- a/internal/dkim/sign_test.go +++ b/internal/dkim/sign_test.go @@ -47,7 +47,7 @@ func TestSignRSA(t *testing.T) { } ctx = WithLookupTXTFunc(ctx, makeLookupTXT(map[string][]string{ - "test._domainkey.example.com": []string{ + "test._domainkey.example.com": { "v=DKIM1; p=" + base64.StdEncoding.EncodeToString(pub), }, })) @@ -94,7 +94,7 @@ func TestSignEd25519(t *testing.T) { } ctx = WithLookupTXTFunc(ctx, makeLookupTXT(map[string][]string{ - "test._domainkey.example.com": []string{ + "test._domainkey.example.com": { "v=DKIM1; k=ed25519; p=" + base64.StdEncoding.EncodeToString(pub), }, })) diff --git a/internal/dkim/verify_test.go b/internal/dkim/verify_test.go index 0b81183..b9e0710 100644 --- a/internal/dkim/verify_test.go +++ b/internal/dkim/verify_test.go @@ -26,7 +26,7 @@ func TestVerifyRF6376CExample(t *testing.T) { // Use the public key from the example in RFC 6376 appendix C. // https://datatracker.ietf.org/doc/html/rfc6376#appendix-C ctx = WithLookupTXTFunc(ctx, makeLookupTXT(map[string][]string{ - "brisbane._domainkey.example.com": []string{ + "brisbane._domainkey.example.com": { "v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ" + "KBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkMoGeLnQg1fWn7/zYt" + "IxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v" + @@ -94,11 +94,11 @@ func TestVerifyRFC8463Example(t *testing.T) { // Use the public keys from the example in RFC 8463 appendix A.2. // https://datatracker.ietf.org/doc/html/rfc6376#appendix-C ctx = WithLookupTXTFunc(ctx, makeLookupTXT(map[string][]string{ - "brisbane._domainkey.football.example.com": []string{ + "brisbane._domainkey.football.example.com": { "v=DKIM1; k=ed25519; " + "p=11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo="}, - "test._domainkey.football.example.com": []string{ + "test._domainkey.football.example.com": { "v=DKIM1; k=rsa; " + "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkHlOQoBTzWR" + "iGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQiY/J16JYi0Qvx/b" +