cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 38 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 builds the cobra command tree and maps errors to exit codes.

Index

Constants

View Source
const (
	ExitOK          = 0
	ExitError       = 1
	ExitUsage       = 2
	ExitFindings    = 3 // --fail-on matched
	ExitAuth        = 4
	ExitInterrupted = 130
)

Exit codes, as listed in docs/engineering/engineering-standards.md.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, d *app.Deps, args []string) int

Execute runs the command line in args (without the program name) and returns the exit code.

func NewRootCmd

func NewRootCmd(d *app.Deps) *cobra.Command

NewRootCmd returns the full command tree. scripts/gendocs uses it.

func Run

func Run(ctx context.Context, args []string, stdout, stderr io.Writer) int

Run is the process entry point. args includes the program name, as os.Args does.

func ServeMCP

func ServeMCP(
	ctx context.Context,
	d *app.Deps,
	args []string,
	serve func(context.Context, *mcpkit.Server) error,
) error

ServeMCP runs `relgap mcp args...` but hands the server to serve instead of serving stdio, so tests can connect an in-process client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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