version

package
v1.1.8 Latest Latest
Warning

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

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

Documentation

Overview

Package version provides version information for GoPCA. The version variables are populated at build time via ldflags.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version of GoPCA (e.g., "0.9.0", "1.0.0")
	// Set at build time via: -ldflags "-X github.com/bitjungle/gopca/internal/version.Version=x.y.z"
	Version = "dev"

	// GitCommit is the git commit hash
	// Set at build time via: -ldflags "-X github.com/bitjungle/gopca/internal/version.GitCommit=abc123"
	GitCommit = "unknown"

	// BuildDate is the build date in RFC3339 format
	// Set at build time via: -ldflags "-X github.com/bitjungle/gopca/internal/version.BuildDate=2024-01-01T00:00:00Z"
	BuildDate = "unknown"
)

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	GitCommit string `json:"gitCommit"`
	BuildDate string `json:"buildDate"`
	GoVersion string `json:"goVersion"`
	Platform  string `json:"platform"`
}

Info contains all version information

func Get

func Get() Info

Get returns the complete version information

func (Info) Short

func (i Info) Short() string

Short returns a short version string (just the version number)

func (Info) String

func (i Info) String() string

String returns a formatted version string

Jump to

Keyboard shortcuts

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