version

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVersionCmd

func NewVersionCmd() *cobra.Command

NewVersionCmd creates a custom version command that respects the global -O flag.

func OnAppInit

func OnAppInit(app *azldev.App)

Called once when the app is initialized; registers the version command.

Types

type VersionInfo

type VersionInfo struct {
	Version    string `json:"version"`
	GitCommit  string `json:"gitCommit"`
	GoVersion  string `json:"goVersion"`
	Platform   string `json:"platform"`
	Compiler   string `json:"compiler"`
	BuildDate  string `json:"buildDate"`
	CommitDate string `json:"commitDate"`
	DirtyBuild bool   `json:"dirtyBuild"`
}

VersionInfo represents the version information structure.

func GetVersionInfo

func GetVersionInfo() *VersionInfo

GetVersionInfo gathers version information using the same approach as go.szostok.io/version/extension.

Jump to

Keyboard shortcuts

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