Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version is the current library version following semantic versioning. // Format: vMAJOR.MINOR.PATCH[-PRERELEASE]. Version = "0.4.2" // GitCommit is the git commit SHA of the build. // This is set during the build process. GitCommit = "unknown" // BuildDate is the date when the binary was built. // This is set during the build process. BuildDate = "unknown" )
Version information. These values can be overridden at build time using -ldflags.
Example:
go build -ldflags "-X github.com/gizzahub/gzh-cli-gitforge.GitCommit=$(git rev-parse HEAD)"
Functions ¶
func FullVersion ¶
func FullVersion() string
FullVersion returns the version with 'v' prefix.
Example:
fmt.Println(gzhcligitforge.FullVersion()) // Output: v0.1.0-alpha
func ShortVersion ¶
func ShortVersion() string
ShortVersion returns just the version number without prefix.
Example:
fmt.Println(gzhcligitforge.ShortVersion()) // Output: 0.1.0-alpha
func VersionInfo ¶
VersionInfo returns detailed version information as a map.
The returned map contains:
- version: The library version (e.g., "0.1.0-alpha")
- gitCommit: The git commit SHA (e.g., "a1b2c3d")
- buildDate: The build date (e.g., "2025-11-30")
- goVersion: The Go version used for building (e.g., "go1.24.0")
Example:
info := gzhcligitforge.VersionInfo()
fmt.Printf("Version: %s\n", info["version"])
fmt.Printf("Commit: %s\n", info["gitCommit"])
func VersionString ¶
func VersionString() string
VersionString returns a formatted version string.
Format: "gzh-cli-gitforge version v0.1.0-alpha (commit: a1b2c3d, built: 2025-11-30)"
Example:
fmt.Println(gzhcligitforge.VersionString()) // Output: gzh-cli-gitforge version v0.1.0-alpha (commit: unknown, built: unknown)
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gz-git
command
Package main is the entry point for the gz-git CLI application.
|
Package main is the entry point for the gz-git CLI application. |
|
gz-git/cmd
Package cmd implements the CLI commands for gz-git.
|
Package cmd implements the CLI commands for gz-git. |
|
examples
|
|
|
basic
command
|
|
|
branch
command
|
|
|
clone
command
|
|
|
history
command
|
|
|
merge
command
|
|
|
internal
|
|
|
gitcmd
Package gitcmd provides Git command execution and output handling.
|
Package gitcmd provides Git command execution and output handling. |
|
testutil/builders
Package builders provides fluent test fixture builders for git operations.
|
Package builders provides fluent test fixture builders for git operations. |
|
pkg
|
|
|
config
Package config provides configuration management for gz-git CLI.
|
Package config provides configuration management for gz-git CLI. |
|
wizard
Package wizard provides interactive setup wizards for gz-git commands.
|
Package wizard provides interactive setup wizards for gz-git commands. |
Click to show internal directories.
Click to hide internal directories.