cli

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli wires the gitr cobra commands together.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(info BuildInfo) int

Execute runs gitr and returns the process exit code.

Types

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string
	Date    string
}

BuildInfo is stamped into the binary by the main package (see cmd/gitr/main.go for the -ldflags variables).

func ResolveBuildInfo

func ResolveBuildInfo(version, commit, date string) BuildInfo

ResolveBuildInfo prefers ldflags values and falls back to what the Go toolchain recorded (so `go install ...@v1.2.3` still reports v1.2.3).

func (BuildInfo) String

func (b BuildInfo) String() string

Jump to

Keyboard shortcuts

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