1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-22 15:27:02 +00:00

Fix misc. linter issues (comments, variable naming, etc.)

We've accumulated a few linter issues around comments and a couple of
variable names.

While none of them is major, this patch cleans them up so it's easier to
go through the linter output, and we can start being more strict about
it.
This commit is contained in:
Alberto Bertogli
2022-08-27 23:16:01 +01:00
parent 6dfff9a790
commit e85c31782b
11 changed files with 30 additions and 13 deletions

View File

@@ -60,11 +60,11 @@ func usersWithXDontExist(user, domain string) (bool, error) {
return true, nil
}
var userLookupError = errors.New("test error userLookupError")
var errUserLookup = errors.New("test error errUserLookup")
func usersWithXErrorYDontExist(user, domain string) (bool, error) {
if strings.HasPrefix(user, "x") {
return false, userLookupError
return false, errUserLookup
}
if strings.HasPrefix(user, "y") {
return false, nil
@@ -134,12 +134,12 @@ func TestUserLookupErrors(t *testing.T) {
cases := Cases{
{"a@dom", []Recipient{{"a@remote", EMAIL}}, nil},
{"b@dom", nil, userLookupError},
{"b@dom", nil, errUserLookup},
{"c@dom", []Recipient{{"c@dom", EMAIL}}, nil},
{"x@dom", nil, userLookupError},
{"x@dom", nil, errUserLookup},
// This one goes through the catch-all.
{"y@dom", nil, userLookupError},
{"y@dom", nil, errUserLookup},
}
cases.check(t, resolver)
}