{"repo":"Masterminds/semver","free":true,"listed":false,"github":"https://github.com/Masterminds/semver","clone":"git clone https://github.com/Masterminds/semver.git","description":"Work with Semantic Versions in Go","language":"Go","stars":1429,"topics":["semantic-versions","semver","golang","go","constraints","comparison","tilde","caret"],"license":"MIT","category":"dev-tools","readme_excerpt":"SemVer The semver package provides the ability to work with Semantic Versions in Go. Specifically it provides the ability to: Parse semantic versions Sort semantic versions Check if a semantic version fits within a set of constraints Optionally work with a v prefix Package Versions Note, import github.com/Masterminds/semver/v3 to use the latest version. There are three major versions fo the semver package. 3.x.x is the stable and active version. This version is focused on constraint compatibility for range handling in other tools from other languages. It has a similar API to the v1 releases. The development of this version is on the master branch. The documentation for this version is below. 2.x was developed primarily for dep. There are no tagged releases and the development was performed by @sdboyer. There are API breaking changes from v1. This version lives on the 2.x branch. 1.x.x is the original release. It is no longer maintained. You should use the v3 release instead. You can read the documentation for the 1.x.x release here. Parsing Semantic Versions There are two functions that can parse semantic versions. The StrictNewVersion function only parses valid version 2 semantic versions as outlined in the specification. The NewVersion function attempts to coerce a version into a semantic version and parse it. For example, if there is a leading v or a version listed without all 3 parts (e.g. v1.2 ) it will attempt to coerce it into a valid semantic version (e.g., 1.2.0). In","default_branch":null,"files":null,"tree":[],"storefront":"/r/Masterminds","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Masterminds/semver/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}