Documentation ¶
Index ¶
- func Copy(src, dest string) error
- func DecrementVersion(v *SemanticVer)
- func ExpandTilde(path string) (string, error)
- func FormatFromSemanticVersion(v *SemanticVer) string
- func IsVersionEqual(v1, v2 *SemanticVer) bool
- func IsVersionGreaterThan(v1, v2 *SemanticVer) bool
- func IsVersionLessThan(v1, v2 *SemanticVer) bool
- func Unzip(src string, dest string) ([]string, error)
- type MismatchType
- type SemanticVer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecrementVersion ¶
func DecrementVersion(v *SemanticVer)
Decrement the version. If Patch is 0, decrement Minor and reset Patch to 9. If Minor is 0, decrement Major.
func ExpandTilde ¶
func FormatFromSemanticVersion ¶
func FormatFromSemanticVersion(v *SemanticVer) string
Format the version struct back to a string "vX.Y.Z"
func IsVersionEqual ¶
func IsVersionEqual(v1, v2 *SemanticVer) bool
func IsVersionGreaterThan ¶
func IsVersionGreaterThan(v1, v2 *SemanticVer) bool
func IsVersionLessThan ¶
func IsVersionLessThan(v1, v2 *SemanticVer) bool
Check if version v1 is less than v2
Types ¶
type MismatchType ¶
type MismatchType int
const ( NoMismatch MismatchType = iota MinVersionMismatch TargetVersionMismatch )
type SemanticVer ¶
type SemanticVer struct {
Major, Minor, Patch int
}
func ParseToSemanticVersion ¶
func ParseToSemanticVersion(version string) (v *SemanticVer)
Parse the version string "vX.Y.Z" into a struct with X, Y, Z as integers
Click to show internal directories.
Click to hide internal directories.