-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
semver: forward to x/mod/semver (#210)
This is now the canonical location of the semver package.
- Loading branch information
Showing
3 changed files
with
37 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
Oops, something went wrong.