lvutil

package
v3.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src, dest string) error

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 ExpandTilde(path string) (string, error)

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

func Unzip

func Unzip(src string, dest string) ([]string, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL