cmd

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 142 Imported by: 1 module, 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 cmd defines Leakwatch CLI commands. This package is a thin wiring layer; it must not contain business logic.

Package cmd defines Leakwatch CLI commands. This package is a thin wiring layer; it must not contain business logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() int

Execute runs the root command and returns the process exit code:

0  clean, completed scan with no findings
1  findings were reported (FindingsExitError)
2  a generic error (bad flags, config parse failure, scan failure)
3  the scan was interrupted before completing (InterruptedExitError)

func SetVersionInfo

func SetVersionInfo(version, commit, date string)

SetVersionInfo sets build information (called from main.go).

Types

type FindingsExitError

type FindingsExitError struct {
	Count int
}

FindingsExitError indicates that secrets were found (exit code 1).

func (*FindingsExitError) Error

func (e *FindingsExitError) Error() string

type InterruptedExitError added in v1.7.0

type InterruptedExitError struct{}

InterruptedExitError indicates the scan was interrupted (SIGINT/SIGTERM) before completing, so its partial results must not be trusted as a clean pass. It maps to exit code 3, distinct from findings (1) and generic errors (2), so a CI pipeline can never observe a clean exit 0 for a scan that did not finish.

func (*InterruptedExitError) Error added in v1.7.0

func (e *InterruptedExitError) Error() string

Jump to

Keyboard shortcuts

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