releaseinfo

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package releaseinfo exposes the build's normalized release identity.

Index

Constants

View Source
const DevelopmentVersion = "dev"

Variables

View Source
var (
	// Version is replaced for release builds with:
	// -ldflags "-X github.com/baldaworks/knowl/internal/releaseinfo.Version=vX.Y.Z".
	Version = DevelopmentVersion

	ErrDevelopmentBuild = errors.New("development build has no release identity")
	ErrInvalidVersion   = errors.New("invalid release version")
)

Functions

This section is empty.

Types

type Identity

type Identity struct {
	Version string `json:"version"`
	Tag     string `json:"tag,omitempty"`
	Release bool   `json:"release"`
}

Identity is the normalized version information emitted by the CLI.

func Current

func Current() (Identity, error)

Current parses the release identity embedded in this build.

func CurrentRelease

func CurrentRelease() (Identity, error)

CurrentRelease returns the embedded identity only for a valid release build.

func Parse

func Parse(value string) (Identity, error)

Parse normalizes a development marker or a stable semantic version/tag.

Jump to

Keyboard shortcuts

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