cli

package
v0.180.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 75 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 assembles the Draugr command-line interface on top of Cobra.

Index

Constants

View Source
const DescriptorName = "draugr.saga.yaml"

DescriptorName is the file `draugr init` writes. It is one of several names a scan will find, not the only one. See descriptorsIn.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context) int

Execute builds and runs the root command using the process arguments, wiring telemetry and interrupt handling around it. It returns a process exit code.

func IsFragmentFile added in v0.69.0

func IsFragmentFile(name string) bool

IsFragmentFile reports whether a filename is a Saga fragment.

A distinct file type rather than a convention, because editors decide which schema to apply from the name: the Saga schema requires a release, so a fragment named `*.saga.yaml` would be flagged as invalid in every editor that reads the published catalog.

func LogWriter added in v0.76.0

func LogWriter(w io.Writer) io.Writer

LogWriter wraps stderr so a log line erases the progress line before printing.

The erase and the write happen under the renderer's own lock, so an update cannot redraw between them and leave the two interleaved.

func ZeroConfigControls added in v0.32.0

func ZeroConfigControls() string

ZeroConfigControls lists those controls as a sentence names them, e.g. "iac, sast, sca and secrets".

Types

This section is empty.

Jump to

Keyboard shortcuts

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