Skip to content

Commit

Permalink
semver: forward to x/mod/semver (#210)
Browse files Browse the repository at this point in the history
This is now the canonical location of the semver package.
  • Loading branch information
rogpeppe committed Mar 27, 2023
1 parent 6e5fb8c commit a354da8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 570 deletions.
37 changes: 37 additions & 0 deletions semver/forward.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Package semver is a thin forwarding layer on top of
// [golang.org/x/mod/semver]. See that package for documentation.
package semver

import "golang.org/x/mod/semver"

func IsValid(v string) bool {
return semver.IsValid(v)
}

func Canonical(v string) string {
return semver.Canonical(v)
}

func Major(v string) string {
return semver.Major(v)
}

func MajorMinor(v string) string {
return semver.MajorMinor(v)
}

func Prerelease(v string) string {
return semver.Prerelease(v)
}

func Build(v string) string {
return semver.Build(v)
}

func Compare(v, w string) int {
return semver.Compare(v, w)
}

func Max(v, w string) string {
return semver.Max(v, w)
}

0 comments on commit a354da8

Please sign in to comment.