cli

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 50 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 holds the thin cobra command handlers for the plugit binary. Handlers parse flags and delegate to the internal packages; they hold no business logic of their own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string, stdin io.Reader, stdout, stderr io.Writer, info BuildInfo) int

Main runs plugit with args (without the program name) and returns the process exit code. The hidden isolate.ChildArg first argument turns the process into a spec-parse child (see package isolate); it is not a cobra command, so it never appears in help.

func NewRootCmd

func NewRootCmd(info BuildInfo) *cobra.Command

NewRootCmd builds the plugit command tree.

Types

type BuildInfo

type BuildInfo struct {
	Version string
	Commit  string
	Date    string
}

BuildInfo describes the running binary. Values are injected at build time with -ldflags; empty fields fall back to development defaults.

func (BuildInfo) Fill added in v0.2.1

func (b BuildInfo) Fill(bi *debug.BuildInfo) BuildInfo

Fill fills empty fields from the binary's embedded Go build info.

Jump to

Keyboard shortcuts

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