versionutil

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GreaterEqual added in v1.0.0

func GreaterEqual(limaVersion, oldVersion string) bool

GreaterEqual return true if limaVersion >= oldVersion.

func GreaterThan

func GreaterThan(limaVersion, oldVersion string) bool

GreaterThan returns true if the Lima version used to create an instance is greater than a specific older version. Always returns false if the Lima version is the empty string. Unparsable lima versions (like SHA1 commit ids) are treated as the latest version and return true. limaVersion is a `github describe` string, not a semantic version. So "0.19.1-16-gf3dc6ed.m" will be considered greater than "0.19.1".

func Parse

func Parse(version string) (*semver.Version, error)

Parse parses a Lima version string by removing the leading "v" character and stripping everything from the first "-" forward (which are `git describe` artifacts and not semver pre-release markers). So "v0.19.1-16-gf3dc6ed.m" will be parsed as "0.19.1".

Types

This section is empty.

Jump to

Keyboard shortcuts

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