version

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version exposes cadish's build/version information.

Index

Constants

This section is empty.

Variables

View Source
var Commit = ""

Commit is the full git commit the binary was built from, stamped at release time via -ldflags "-X .../internal/version.Commit={{.FullCommit}}". When unset (a plain `go build`), the VCS revision from the embedded build info is used.

View Source
var Date = ""

Date is the build/commit date (RFC3339), stamped at release time via -ldflags "-X .../internal/version.Date={{.CommitDate}}". When unset, the VCS time from the embedded build info is used.

View Source
var Version = "dev"

Version is the released version string. It is overridden at release time via -ldflags "-X github.com/cadi-sh/cadish/internal/version.Version=vX.Y.Z". For development builds it stays "dev"; String() then falls back to the module version embedded by the Go toolchain (so `go install …@vX.Y.Z` reports vX.Y.Z), and to the VCS revision/time, from the embedded build info.

Functions

func String

func String() string

String returns a human-readable version line, e.g. "cadish v1.2.3 (abc1234def567, 2026-06-24T00:00:00Z, go1.26.0)". When the release-time Commit/Date vars are not stamped (a plain `go build`), it falls back to the VCS revision/time embedded by the Go toolchain.

Types

This section is empty.

Jump to

Keyboard shortcuts

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