zaccone / spf

Sender Policy Framework
MIT License
20 stars 6 forks source link

make ErrTooManySPFRecords exported. #33

Open femaref opened 6 years ago

femaref commented 6 years ago

The error is useful outside the library, and this way it's easier to be checked for.

marek-denis commented 6 years ago

Thanks for the PR. I will merge the change right after I update required min. Go version in TravisCI :)

femaref commented 6 years ago

alright. I'll be opening a few more pull requests soon, I've fixed some syntax parsing fails and implemented the official test suite. it doesn't pass fully yet and I don't have enough time to fix them all, but it's a start.

marek-denis commented 6 years ago

Cool. Not sure if I understood correctly, but did you actually run tests defined in pyspf ? These are probably most comprehensive and contain all (most) of edge cases, collected over the years. My goal was to actually run this lib against pyspf tests, but that will probably require some additional 'testing' framework. If this is what you had in mind I would be super happy to collaborate and/or merge code here!

femaref commented 6 years ago

yes. I've implemented custom parsing of the yaml test suite that is published. the multi-type fields where as annoying as you mentioned, but by implementing the Unmarshaler interface it was possible to handle it.

edit. code here: https://github.com/femaref/spf/blob/master/suite/suite.go and used in spf/suite_test.go.