version

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version carries the product build version.

Index

Constants

This section is empty.

Variables

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

These values are overridden at build time. Release builds set all three:

go build -ldflags "\
  -X github.com/ArasanDev/yt/internal/version.Version=v0.1.0 \
  -X github.com/ArasanDev/yt/internal/version.Commit=$(git rev-parse --short HEAD) \
  -X github.com/ArasanDev/yt/internal/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
  ./cmd/yt

Version is the only value MCP clients see; keep it a plain version string.

Functions

func Current

func Current() string

Current returns the plain version. When a binary is built with `go install module@version`, Go records the module version in the build info but cannot inject ldflags, so fall back to that instead of reporting "dev" for an installed release.

func String

func String() string

String is the human-facing `yt --version` value. It falls back to the bare version when a development build was not stamped with commit metadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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