version

package
v0.0.49 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the application version, set at build time via ldflags. Example: go build -ldflags "-X github.com/shishobooks/shisho/pkg/version.Version=1.0.0".

Functions

func Compare added in v0.0.33

func Compare(a, b string) int

Compare returns -1 if a < b, 0 if a == b, 1 if a > b using semver comparison on major.minor.patch only. Prerelease suffixes (anything after "-") are stripped before comparing, so "1.0.0-rc1" and "1.0.0" compare equal. Returns 0 if either input is unparseable.

func IsCompatible added in v0.0.18

func IsCompatible(minVersion string) bool

IsCompatible returns true if the current Version satisfies the given minimum version requirement. Returns true if either version is empty, "dev", or not parseable as semver (permissive by default).

Types

This section is empty.

Jump to

Keyboard shortcuts

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