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.6.1" // 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
|
|
|
branch
Package branch provides git branch management operations.
|
Package branch provides git branch management operations. |
|
cliutil
Package cliutil provides CLI utility functions and formatters.
|
Package cliutil provides CLI utility functions and formatters. |
|
config
Package config provides configuration management for gz-git CLI.
|
Package config provides configuration management for gz-git CLI. |
|
gitea
Package gitea implements the provider interface for Gitea.
|
Package gitea implements the provider interface for Gitea. |
|
github
Package github implements the provider interface for GitHub.
|
Package github implements the provider interface for GitHub. |
|
gitlab
Package gitlab implements the provider interface for GitLab.
|
Package gitlab implements the provider interface for GitLab. |
|
history
Package history provides git history analysis and contributor statistics.
|
Package history provides git history analysis and contributor statistics. |
|
hooks
Package hooks provides secure command execution for before/after hooks.
|
Package hooks provides secure command execution for before/after hooks. |
|
merge
Package merge provides merge conflict detection and analysis.
|
Package merge provides merge conflict detection and analysis. |
|
provider
Package provider defines the interface for Git forge providers.
|
Package provider defines the interface for Git forge providers. |
|
ratelimit
Package ratelimit provides rate limiting functionality for API calls.
|
Package ratelimit provides rate limiting functionality for API calls. |
|
repository
Package repository provides git repository abstraction and bulk operations.
|
Package repository provides git repository abstraction and bulk operations. |
|
scanner
Package scanner provides local git repository discovery and scanning.
|
Package scanner provides local git repository discovery and scanning. |
|
stash
Package stash provides git stash management operations.
|
Package stash provides git stash management operations. |
|
tag
Package tag provides git tag management and semantic versioning.
|
Package tag provides git tag management and semantic versioning. |
|
templates
Package templates provides configuration file template generation.
|
Package templates provides configuration file template generation. |
|
tui
Package tui provides terminal UI components for interactive displays.
|
Package tui provides terminal UI components for interactive displays. |
|
watch
Package watch provides repository monitoring and change detection.
|
Package watch provides repository monitoring and change detection. |
|
wizard
Package wizard provides interactive setup wizards for gz-git commands.
|
Package wizard provides interactive setup wizards for gz-git commands. |
|
workspacecli
Package workspacecli provides CLI commands for managing local workspaces with config-based repository synchronization.
|
Package workspacecli provides CLI commands for managing local workspaces with config-based repository synchronization. |
Click to show internal directories.
Click to hide internal directories.