mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-18 14:47:03 +00:00
Fix minor typos found by codespell
This patch fixes some minor typos in comments and strings found by codespell. While at it, also expand some variable names that were not typos, but caused false positives, and end up being more readable anyway.
This commit is contained in:
@@ -280,21 +280,21 @@ func loadCert(name, dir string, s *smtpsrv.Server) {
|
||||
func loadDomain(name, dir string, s *smtpsrv.Server) {
|
||||
s.AddDomain(name)
|
||||
|
||||
nu, err := s.AddUserDB(name, dir+"/users")
|
||||
nusers, err := s.AddUserDB(name, dir+"/users")
|
||||
if err != nil {
|
||||
// If there is an error loading users, fail hard to make sure this is
|
||||
// noticed and fixed as soon as it happens.
|
||||
log.Fatalf(" %s: users file error: %v", name, err)
|
||||
}
|
||||
|
||||
na, err := s.AddAliasesFile(name, dir+"/aliases")
|
||||
naliases, err := s.AddAliasesFile(name, dir+"/aliases")
|
||||
if err != nil {
|
||||
// If there's an error loading aliases, fail hard to make sure this is
|
||||
// noticed and fixed as soon as it happens.
|
||||
log.Fatalf(" %s: aliases file error: %v", name, err)
|
||||
}
|
||||
|
||||
nd, err := loadDKIM(name, dir, s)
|
||||
ndkim, err := loadDKIM(name, dir, s)
|
||||
if err != nil {
|
||||
// DKIM errors are fatal because if the user set DKIM up, then we
|
||||
// don't want it to be failing silently, as that could cause
|
||||
@@ -302,7 +302,8 @@ func loadDomain(name, dir string, s *smtpsrv.Server) {
|
||||
log.Fatalf(" %s: DKIM loading error: %v", name, err)
|
||||
}
|
||||
|
||||
log.Infof(" %s (%d users, %d aliases, %d DKIM keys)", name, nu, na, nd)
|
||||
log.Infof(" %s (%d users, %d aliases, %d DKIM keys)",
|
||||
name, nusers, naliases, ndkim)
|
||||
}
|
||||
|
||||
func loadDovecot(s *smtpsrv.Server, userdb, client string) {
|
||||
|
||||
@@ -271,8 +271,8 @@ func (v *Resolver) resolve(rcount int, addr string, tr *trace.Trace) ([]Recipien
|
||||
// aliases).
|
||||
// The queue will attempt delivery against this local (but
|
||||
// evidently non-existing) address, and the courier will emit a
|
||||
// clearer failure, re-using the existing codepaths and
|
||||
// simplifying the logic.
|
||||
// clearer failure, reusing the existing codepaths and simplifying
|
||||
// the logic.
|
||||
tr.Debugf("%d| no catch-all, returning %q", rcount, addr)
|
||||
return []Recipient{{addr, EMAIL}}, nil
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ func TestSMTP(t *testing.T) {
|
||||
// Put a non-existing host first, so we check that if the first host
|
||||
// doesn't work, we try with the rest.
|
||||
// The host we use is invalid, to avoid having to do an actual network
|
||||
// lookup whick makes the test more hermetic. This is a hack, ideally we
|
||||
// lookup which makes the test more hermetic. This is a hack, ideally we
|
||||
// would be able to override the default resolver, but Go does not
|
||||
// implement that yet.
|
||||
testMX["to"] = []*net.MX{
|
||||
|
||||
@@ -13,10 +13,10 @@ func TestString(t *testing.T) {
|
||||
s1.Add("a")
|
||||
s1.Add("b", "ccc")
|
||||
|
||||
expectStrings(s1, []string{"a", "b", "ccc"}, []string{"notin"}, t)
|
||||
expectStrings(s1, []string{"a", "b", "ccc"}, []string{"not-in"}, t)
|
||||
|
||||
s2 := NewString("a", "b", "c")
|
||||
expectStrings(s2, []string{"a", "b", "c"}, []string{"notin"}, t)
|
||||
expectStrings(s2, []string{"a", "b", "c"}, []string{"not-in"}, t)
|
||||
|
||||
// Test that Has works (and not panics) on a nil set.
|
||||
var s3 *String
|
||||
|
||||
Reference in New Issue
Block a user