version

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source

Logo is the compact ASCII brand mark as provided by the user (verbatim, character-for-character — kept exact even where the letterforms are unconventional). Single source of truth: shared by `brocode -v` and the TUI's fresh-session hero banner so the brand never drifts between them.

View Source
const Tagline = "ship less, ship right"

Tagline is the CLI's one-line motto.

Variables

View Source
var (
	// Version is the current semver release of BroCode.
	Version = "v0.1.39"
	// Commit is the git commit hash, populated at build time via -ldflags.
	Commit = "none"
	// Date is the build timestamp, populated at build time via -ldflags.
	Date = "unknown"
)

Functions

func Banner() string

Banner returns the logo plus tagline and version (used by `brocode -v`), both flush left so the brand block reads as one neat column.

func CheckLatestVersion added in v0.1.36

func CheckLatestVersion(ctx context.Context, forceRefresh bool) (string, bool, error)

CheckLatestVersion checks GitHub Releases for the latest version with 12h local caching.

func Info

func Info() string

Info returns the formatted version information for CLI output.

func SelfUpdate added in v0.1.36

func SelfUpdate(ctx context.Context, targetTag string) (string, error)

SelfUpdate downloads and installs the latest binary for the current OS/Arch.

Types

type VersionCache added in v0.1.36

type VersionCache struct {
	LatestTag   string    `json:"latest_tag"`
	CheckedAt   time.Time `json:"checked_at"`
	HasUpdate   bool      `json:"has_update"`
	DownloadURL string    `json:"download_url"`
}

VersionCache holds the cached latest release info.

Jump to

Keyboard shortcuts

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