Help us shape the future of Go! Take the 2026 Go Developer Survey

debug

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package debug provides a process-global, stderr-based debug logger.

It is a leaf package (no imports of client/config/cmd) so any layer can emit debug lines via Logf without plumbing a logger through call sites. Enabling is a single switch: set Enabled = true (done by the --debug flag / APTBASE_DEBUG / config). All output goes to stderr so it never pollutes --json on stdout.

Index

Constants

This section is empty.

Variables

View Source
var Enabled bool

Enabled turns debug output on. When false, all logging is a no-op.

Functions

func Logf

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

Logf writes a timestamped debug line to stderr when Enabled.

func Redact

func Redact(b []byte) string

Redact masks the values of known sensitive JSON fields in b, returning a string safe to log.

func Section

func Section(title string)

Section writes a bold debug header to group related output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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