version

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 3 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 version holds the build identity, stamped at link time by the release build:

go build -ldflags "-X github.com/offsetsecurity/cipherhorizon/internal/version.Version=1.2.3 \
  -X github.com/offsetsecurity/cipherhorizon/internal/version.Commit=abc1234 \
  -X github.com/offsetsecurity/cipherhorizon/internal/version.Date=2026-01-02T03:04:05Z" ./cmd/cipherhorizon

A plain "go build" or "go install ...@vX.Y.Z" leaves the variables at their defaults; Info then falls back to what the Go toolchain embedded, so those builds still identify themselves.

Index

Constants

This section is empty.

Variables

View Source
var Commit = ""

Commit is the source revision the binary was built from, when known.

View Source
var Date = ""

Date is the build time (RFC 3339, UTC), when known. Release builds take it from the commit, not the clock, so a rebuilt tag is byte-identical.

View Source
var Version = "0.0.0-dev"

Version is the program version (SemVer, without a leading "v"). "0.0.0-dev" marks an unstamped build.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit,omitempty"`
	Date      string `json:"date,omitempty"`
	GoVersion string `json:"goVersion"`
	Platform  string `json:"platform"`
}

Info is the build identity shown by "cipherhorizon version" and recorded in reports.

func Get

func Get() Info

Get returns the build identity, filling gaps from the module and VCS data the toolchain embeds.

func (Info) String

func (i Info) String() string

String is the one-line form: "1.2.3 (commit abc1234, built 2026-01-02T03:04:05Z, go1.25.0 linux/amd64)".

Jump to

Keyboard shortcuts

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