NewSemver parses the given version and returns a new Version that adheres strictly to SemVer specs https://semver.org/
(v string)
| 54 | // Version that adheres strictly to SemVer specs |
| 55 | // https://semver.org/ |
| 56 | func NewSemver(v string) (*Version, error) { |
| 57 | return newVersion(v, semverRegexp) |
| 58 | } |
| 59 | |
| 60 | func newVersion(v string, pattern *regexp.Regexp) (*Version, error) { |
| 61 | matches := pattern.FindStringSubmatch(v) |