Masterminds/semver ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Go package for working with semantic versions.
I want it to be able to parse version strings, compare them, sort a list of versions, and check whether a version matches a constraint like >= 1.2.3 or ^1.4. It should handle prerelease versions correctly, and also be able to accept versions with a leading v when needed.
Please make it feel like a solid reusable library, with good tests and clear examples in the README. If there are any tricky SemVer edge cases, especially around prereleases and version ranges, handle them the way common package managers do. If you need to look up the latest SemVer behavior or Go docs, do that online.
Are you gonna build this?
make sure you review the code using coderabbit