version

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version provides build-time version information for the gonuget CLI. Version information is injected at build time using -ldflags.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version (e.g., "v0.1.0" or "dev")
	Version = "dev"

	// Commit is the git commit SHA (short form, e.g., "a1b2c3d" or "none")
	Commit = "none"

	// Date is the build timestamp (ISO 8601 format, e.g., "2025-11-04T12:00:00Z" or "unknown")
	Date = "unknown"

	// GoVersion is the Go version used to build the binary (optional)
	GoVersion = runtime.Version()
)

Build-time variables injected via -ldflags -X

Functions

func FullInfo

func FullInfo() string

FullInfo returns detailed version information including Go version. Example output: "gonuget version v0.1.0 (commit: a1b2c3d, built: 2025-11-04T12:00:00Z, go: go1.23.1)"

func Info

func Info() string

Info returns a formatted string with version information suitable for display. Example output: "gonuget version v0.1.0 (commit: a1b2c3d, built: 2025-11-04T12:00:00Z)"

Types

This section is empty.

Jump to

Keyboard shortcuts

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