version

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version holds the semantic version of the binary.
	// Defaults to a development placeholder when not set by the build system.
	Version = "0.0.0-dev"

	// Commit holds the VCS commit hash used to build the binary (optional).
	Commit = ""

	// Date holds the build timestamp (optional).
	Date = ""
)

These variables are intended to be populated at build time via -ldflags. For example, GoReleaser injects:

-X github.com/tis24dev/proxsave/internal/version.Version=v0.9.0
-X github.com/tis24dev/proxsave/internal/version.Commit=abcdef123
-X github.com/tis24dev/proxsave/internal/version.Date=2025-01-01T12:34:56Z

Functions

func String

func String() string

String returns the effective version string used across the application. Preference order:

  1. Value injected into Version via ldflags (e.g., GoReleaser).
  2. Main module version from debug.ReadBuildInfo (if available and not "(devel)").
  3. Fallback development placeholder.

The returned version is normalized by stripping any leading "v" prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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