Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ func TestSelectingRecord(t *testing.T) {
{"v-spf2", None, ErrSPFNotFound},
{"v-spf10", None, ErrSPFNotFound},
{"no-record", None, ErrSPFNotFound},
{"many-records", Permerror, errTooManySPFRecords},
{"many-records", Permerror, ErrTooManySPFRecords},
{"mixed-records", Pass, nil},
}

Expand Down
4 changes: 2 additions & 2 deletions spf.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (
ErrDNSLimitExceeded = errors.New("limit exceeded")
ErrSPFNotFound = errors.New("SPF record not found")
errInvalidCIDRLength = errors.New("invalid CIDR length")
errTooManySPFRecords = errors.New("too many SPF records")
ErrTooManySPFRecords = errors.New("too many SPF records")
)

// IPMatcherFunc returns true if ip matches to implemented rules.
Expand Down Expand Up @@ -202,7 +202,7 @@ func filterSPF(txt []string) (string, error) {
n++
}
if n > 1 {
return "", errTooManySPFRecords
return "", ErrTooManySPFRecords
}
return spf, nil
}
Expand Down