silent

package
v0.42.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package silent provides the CLI commands "--silent" flag that raises the log level to warning and above.

Index

Constants

View Source
const (
	SilentFlagName = "silent"
)

Names of the CLI flags provided in this package.

Variables

This section is empty.

Functions

func BeforeCommand

func BeforeCommand(cmd *cobra.Command) error

BeforeCommand runs before(!) the debug flag's BeforeCommand and raises the logging bar when the "--silent" flag has been specified with the command. It does so by attaching the forced level to the context of the command.

func PreferSilence

func PreferSilence(cmd *cobra.Command)

PreferSilence configures the command to default to --silence instead of --silence=false; CLI users can still override this by specifying “--silence=false”. PreferSilence needs to be called before the BeforeCommand plugins chain runs, that is, before clippy.BeforeCommand.

func SetupCLI

func SetupCLI(cmd *cobra.Command)

SetupCLI runs after(!) the debug flag's SetupCLI so that we can add our "--silent" flag and make it mutually exclusive to the "--debug" flag.

Types

This section is empty.

Jump to

Keyboard shortcuts

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