version

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version        string
	GitCommit      string
	GitCommitShort string
	GitBranch      string
	GitBranchSlug  string
	GitDescribe    string
	LatestTag      string
	BuildTime      string
	IsDirty        bool
	DefaultBranch  string
}

Info contains version information

func GetVersionInfo

func GetVersionInfo(repoPath string, defaultBranch string) (*Info, error)

GetVersionInfo retrieves version information from the Git repository at the given path defaultBranch specifies the main branch (e.g., "main" or "master"). If empty, attempts auto-detection.

func (*Info) DetailedString

func (i *Info) DetailedString() string

DetailedString returns a detailed multi-line string with all version information

func (*Info) String

func (i *Info) String() string

String returns a formatted string representation of the version info

Jump to

Keyboard shortcuts

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