Open femaref opened 6 years ago
Thanks for the PR. I will merge the change right after I update required min. Go version in TravisCI :)
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.
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!
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.
The error is useful outside the library, and this way it's easier to be checked for.