version

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package version provides build-time version information for GoatFlow. These variables are set at build time via -ldflags.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version (e.g., "v0.5.1") or branch name if not a tagged build
	Version = "dev"

	// GitCommit is the short git commit SHA
	GitCommit = "unknown"

	// GitBranch is the git branch name
	GitBranch = "unknown"

	// BuildDate is the build timestamp
	BuildDate = "unknown"
)

Build-time variables set via ldflags

Functions

func Full

func Full() string

Full returns the full version string with all details.

func Short

func Short() string

Short returns just the version or branch name.

func String

func String() string

String returns a human-readable version string. Format: "v0.5.1 (abc1234)" or "main (abc1234)" for non-tagged builds

Types

type Info

type Info struct {
	Version   string `json:"version"`
	GitCommit string `json:"git_commit"`
	GitBranch string `json:"git_branch"`
	BuildDate string `json:"build_date"`
	GoVersion string `json:"go_version"`
}

Info contains structured version information.

func GetInfo

func GetInfo() Info

GetInfo returns the current version info.

Jump to

Keyboard shortcuts

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