git » chasquid » commit 227379e

cleanup: Remove unused/unnecessary code

author Andreas Deininger
2024-12-01 20:56:13 UTC
committer Alberto Bertogli
2024-12-01 22:03:47 UTC
parent eb21e61a4f7fba28042f72547cce4e78b806ce45

cleanup: Remove unused/unnecessary code

internal/aliases/aliases.go +1 -5
internal/dkim/canonicalize.go +0 -2

diff --git a/internal/aliases/aliases.go b/internal/aliases/aliases.go
index 9f61286..0fec20e 100644
--- a/internal/aliases/aliases.go
+++ b/internal/aliases/aliases.go
@@ -178,11 +178,7 @@ func (v *Resolver) Exists(tr *trace.Trace, addr string) bool {
 
 	domain := envelope.DomainOf(addr)
 	catchAll, _ := v.lookup("*@"+domain, tr)
-	if len(catchAll) > 0 {
-		return true
-	}
-
-	return false
+	return len(catchAll) > 0
 }
 
 func (v *Resolver) lookup(addr string, tr *trace.Trace) ([]Recipient, error) {
diff --git a/internal/dkim/canonicalize.go b/internal/dkim/canonicalize.go
index c9a5357..8654697 100644
--- a/internal/dkim/canonicalize.go
+++ b/internal/dkim/canonicalize.go
@@ -8,8 +8,6 @@ import (
 )
 
 var (
-	errNoBody = errors.New("no body found")
-
 	errUnknownCanonicalization = errors.New("unknown canonicalization")
 )