version

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package version provides build-time version information. Variables are set via ldflags at compile time.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"
	GitCommit = "unknown"
	BuildDate = "unknown"
	BuildYear = ""

	// Path is the Go module import path for this binary. Defaults to the
	// expected public path; init() overrides from BuildInfo.Main.Path
	// when available (reliable for `go install`-produced binaries).
	Path = "github.com/truestamp/truestamp-cli"
)

Set at build time via -ldflags "-X ...". Defaults are used when building without ldflags; init() then tries runtime/debug.ReadBuildInfo to populate plausible values (e.g., for `go install` or `go run` users).

Functions

func Copyright() string

Copyright returns the copyright notice with dynamic end year.

func Full

func Full() string

Full returns the complete version string with commit and build date.

func GoFor

func GoFor() string

GoFor returns the Go toolchain version with platform, e.g. "go1.26.1 for darwin/arm64".

func GoVersion

func GoVersion() string

GoVersion returns the Go toolchain version used to build this binary.

func Platform

func Platform() string

Platform returns the GOOS/GOARCH pair for this binary.

func Short

func Short() string

Short returns just the version number.

Types

This section is empty.

Jump to

Keyboard shortcuts

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