version

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDevVersion

func IsDevVersion(tag string) bool

IsDevVersion checks if a version tag represents a development version. Development versions contain the "-dev-" substring in their tag.

func IsNewer

func IsNewer(candidate, current string) (bool, error)

IsNewer compares two version strings and returns true if the candidate version is newer than the current version. Both versions must be valid semantic versions.

Version comparison rules:

  • Stable versions are compared using standard semver comparison
  • Dev versions with higher base versions are considered newer
  • Dev versions with the same base version are compared by their prerelease identifiers (which include timestamps), so newer timestamps result in lexicographically greater prerelease strings

func ParseVersion

func ParseVersion(tag string) (*semver.Version, error)

ParseVersion parses a version string into a semver.Version object. It automatically strips the "v" prefix if present and returns an error if the version string is invalid according to semantic versioning rules.

Types

This section is empty.

Jump to

Keyboard shortcuts

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