debug

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package debug provides a process-wide flag and Printf-style helper for the global `--debug` flag. cmd/root.go writes the flag value here on startup; everywhere else just reads via Enabled() / Printf().

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled() bool

Enabled reports whether debug output is on.

func Printf

func Printf(format string, args ...any)

Printf writes a single line to stderr, prefixed with debug, when --debug is on. No-op otherwise.

func Set

func Set(v bool)

Set toggles debug output. Call from the cobra root command's PreRun (or during flag parsing) so downstream packages see the right value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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