Help us shape the future of Go! Take the 2026 Go Developer Survey

version

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package version is the single place that carries build identity. Every build path — go install, the justfile, Docker, and GoReleaser — overrides these variables with -ldflags, so nothing else in the tree hardcodes a version string.

Index

Constants

This section is empty.

Variables

View Source
var Commit = ""

Commit is the git commit the binary was built from.

View Source
var Date = ""

Date is the build or commit timestamp, ideally RFC 3339.

View Source
var Version = ""

Version is the release version, normally the git tag without its "v" prefix. Override with:

-ldflags "-X github.com/readeem/hostebin/internal/version.Version=1.2.3"

Functions

func Get

func Get() string

Get returns the version, falling back to the module version recorded by the Go toolchain so that `go install ...@v1.2.3` reports something useful even without ldflags.

func String

func String() string

String is the multi-value form printed by `hostebin version`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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