versionutil

package
v2.0.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GreaterEqual

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 LessThan

func LessThan(limaVersion, oldVersion string) bool

LessThan returns true if limaVersion < oldVersion.

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) or cutting ".m" suffix from exact version. 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