version

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package version holds build metadata, injected at link time via -ldflags.

Index

Constants

This section is empty.

Variables

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

These are set by the Makefile / GoReleaser ldflags. Defaults make `go run` work.

Functions

func String

func String() string

String renders a one-line human summary, e.g. "slackctl v1.2.3 (abc1234, 2026-06-29)".

Types

type Info

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

Info is the machine-readable form returned by `version --json`.

func Get

func Get() Info

Get returns the current build metadata.

Jump to

Keyboard shortcuts

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