version

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version exposes build metadata for the `--version` flag.

Values are populated either by ldflags at release-build time (preferred — see .goreleaser.yml) or by runtime/debug.ReadBuildInfo() as a fallback for `go install` users. When neither yields a version (a bare `go build` without VCS info), Info() reports "dev".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo struct {
	Version   string
	Commit    string
	Date      string
	GoVersion string
}

BuildInfo carries the metadata reported by `clyde --version`.

func Info

func Info() BuildInfo

Info returns the resolved BuildInfo for this binary. Always safe to call; never returns a zero-value Version (falls back to "dev").

Jump to

Keyboard shortcuts

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