cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package cli implements the stacksentry command-line interface.

Index

Constants

View Source
const (
	// ExitOK means the command succeeded and no finding met --fail-on.
	ExitOK = 0
	// ExitFindings means at least one finding met the --fail-on threshold.
	ExitFindings = 1
	// ExitError means invalid input, an unreadable file, an invalid
	// configuration or an unavailable Docker daemon.
	ExitError = 2
)

Exit codes. See docs/exit-codes.md.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, args []string, a *app.App, s Streams) int

Execute runs the CLI with the given arguments and returns the exit code.

func NewRootCommand

func NewRootCommand(a *app.App, s Streams) *cobra.Command

NewRootCommand builds the command tree.

Types

type Streams

type Streams struct {
	Out io.Writer
	Err io.Writer
	// IsTerminal reports whether w is an interactive terminal.
	IsTerminal func(w io.Writer) bool
}

Streams are the standard streams of the process.

func DefaultStreams

func DefaultStreams() Streams

DefaultStreams returns the process' standard streams.

Jump to

Keyboard shortcuts

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