package versions

import "github.com/bitrise-io/go-utils/versions"

Index

Functions

func CompareVersions

func CompareVersions(version1, version2 string) (int, error)

CompareVersions ... semantic version (X.Y.Z) 1 if version 2 is greater then version 1, -1 if not -2 & error if can't compare (if not supported component found)

func IsVersionBetween

func IsVersionBetween(verBase, verLower, verUpper string) (bool, error)

IsVersionBetween ...

returns true if it's between the lower and upper limit
or in case it matches the lower or the upper limit

func IsVersionGreaterOrEqual

func IsVersionGreaterOrEqual(verBase, verLower string) (bool, error)

IsVersionGreaterOrEqual ...

returns true if verBase is greater or equal to verLower

Source Files

versions.go

Version
v1.0.15 (latest)
Published
May 13, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
2 months ago

Tools for package owners.