version

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package version reports how a MyOwnPKI binary was built.

Release builds set the values at link time, for example:

go build -ldflags "-X github.com/Der-Felix/MyOwnPKI/internal/version.version=v0.2.0" ./cmd/myownpki

Local builds fall back to the VCS data the Go toolchain embeds automatically (commit, commit time, uncommitted changes).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string
	Commit    string
	Date      string
	Modified  bool // built from a working tree with uncommitted changes
	GoVersion string
	Platform  string // GOOS/GOARCH
}

Info describes a build. All times are UTC (RFC 3339).

func Get

func Get() Info

Get returns the build information of the running binary.

func (Info) String

func (i Info) String(binary string) string

String formats the build information for --version output, e.g.

myownpki v0.2.0 (commit 1a2b3c4d5e6f, 2026-10-12T09:30:00Z, go1.27.0, linux/amd64)

Jump to

Keyboard shortcuts

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