Help us shape the future of Go! Take the 2026 Go Developer Survey

version

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version holds build metadata injected at link time.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "dev"
	Commit  = "none"
	Date    = "unknown"
)

Set via -ldflags "-X github.com/sneakybugmaster/transporter/internal/version.Version=..." at build time.

Functions

func String

func String() string

String returns a one-line human readable version string.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	Date      string `json:"date"`
	GoVersion string `json:"goVersion"`
	Platform  string `json:"platform"`
}

Info is the JSON-serialisable form of the build metadata.

func Get

func Get() Info

Get returns the build metadata of the running binary.

Jump to

Keyboard shortcuts

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