Closed paulhamby closed 8 years ago
Looks good to me. puppet-anvil has been without love for quite some time since I haven't worked with puppet for a while until recently. There's need for refactoring and cleanups to make the code more readable/testable. I'm glad to see that you help improve the project.
Thanks!
It turns out my sorting solution was a bit "naive". I've switched to using hashicorp/go-version to do the version comparison, which appears to do a much better job. For example, it understands that 1.10.0 is newer than 1.5.0 whereas the previous solution did not.
This is my first crack at implementing the sort.Interface, so I'd be interested in feedback if you think there's a better way to get this done. However, it appears to work and I've added a test case which failed in the previous solution, but works with this one.
Thanks! Paul