version

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package version holds build-time metadata.

Version information is resolved in priority order:

  1. -ldflags overrides (if set during custom builds)
  2. Go module version + VCS metadata from runtime/debug.ReadBuildInfo (automatically embedded by Go 1.18+ toolchain for go install @version)

This ensures `go install github.com/pinealctx/gcode/cmd/gcode@latest` produces meaningful version output without any build script.

Index

Constants

This section is empty.

Variables

View Source
var BuildTime = ""

BuildTime is the build timestamp. Overridden via -ldflags. Defaults to VCS commit time from embedded build info.

View Source
var Commit = ""

Commit is the git commit SHA. Overridden via -ldflags. Defaults to VCS revision from embedded build info.

View Source
var Version = ""

Version is the semantic version. Overridden via -ldflags for custom builds. Defaults to the module version from go.sum, or "dev" for local builds.

Functions

func String

func String() string

String returns a human-readable version summary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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