version

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package version exposes application-wide metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Before added in v0.20.0

func Before(a, b string) bool

Before reports whether version a comes before version b in semantic version order, an invalid one first.

func Commit added in v0.20.0

func Commit() string

Commit returns the commit the binary was built from, or an empty string when the build named none.

func Compare added in v0.20.0

func Compare(a, b string) int

Compare returns -1, 0 or 1 as version a comes before, with or after version b, every invalid one first and equal.

func Generator

func Generator(v string) string

Generator returns how the application names itself and its feature version to a reader.

func MajorMinor

func MajorMinor(v string) string

MajorMinor returns the major and minor parts of a version.

func Minimum added in v0.20.0

func Minimum() string

Minimum returns the minimum version, the oldest version allowed to run on a database this version migrated.

func Stamp added in v0.20.0

func Stamp() string

Stamp returns official for a binary the release workflow built, and an empty string for a custom build.

func Valid added in v0.20.0

func Valid(v string) bool

Valid reports whether v is a full semantic version written without a leading v or build metadata.

func Version

func Version() string

Version returns the application version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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