git » chasquid » commit 1a014be

internal/dkim: Apply gofmt -s

author Alberto Bertogli
2025-10-24 11:43:51 UTC
committer Alberto Bertogli
2025-10-24 11:43:51 UTC
parent 40edb42848361cfab650e9f789bfd56a2bb502d2

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 +2 -2
internal/dkim/verify_test.go +3 -3

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" +