Discover Packages
github.com/watermint/essentials
eformat
eversion
package
Version:
v0.6.2
Opens a new window with list of versions in this module.
Published: Nov 27, 2021
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Compare x, y as semantic version number. The result will be 0 if x==y, -1 if x < y, and +1 if x > y.
type Version struct {
Major uint64 `json:"major"`
Minor uint64 `json:"minor"`
Patch uint64 `json:"patch"`
PreRelease string `json:"pre_release"`
Build string `json:"build"`
}
Max selects maximum version in versions. Returns 0.0.0 if len(versions) == 0.
Min selects minimum version in versions. Returns 0.0.0 if len(versions) == 0.
Parse version string as semantic versioning system MAJOR.MINOR.PATCH
Return 0.0.0 for version and an error outcome if the invalid format.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.