version

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Header = "X-Client-Version"

Variables

This section is empty.

Functions

func IsDevelopment

func IsDevelopment(v string) bool

IsDevelopment returns true for versions that should skip compatibility checks.

func IsHomebrew

func IsHomebrew() bool

IsHomebrew returns true if the binary appears to be installed via homebrew.

func IsNewer

func IsNewer(current, latest string) bool

IsNewer returns true if latest is newer than current. Development versions are never considered outdated.

func ParseMajor

func ParseMajor(v string) string

ParseMajor extracts the major version number from a semver string. Returns "0" for unparseable versions.

Types

type VersionError

type VersionError struct {
	ClientVersion string
	ServerVersion string
	MinVersion    string
	IsUnstable    bool
}

func CheckCompatibility

func CheckCompatibility(clientVersion string) *VersionError

func CheckCompatibilityBetween added in v0.0.5

func CheckCompatibilityBetween(clientVersion, serverVersion string) *VersionError

func (VersionError) Error

func (e VersionError) Error() string

Jump to

Keyboard shortcuts

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