debug

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package debug provides debugging utilities.

Index

Constants

This section is empty.

Variables

View Source
var Enabled = false

Functions

func Printf

func Printf(format string, v ...interface{})

Printf works like log.Printf, but only when debugging is enabled.

func Println

func Println(v ...interface{})

Println works like log.Println, but only when debugging is enabled.

func SetDebug

func SetDebug(b bool)

SetDebug sets the debugging state. When debugging is enabled (true), debug.Printf and debug.Println will print to output. Output by default is os.Stdout, and can be changed with debug.SetOutput.

func SetOutput

func SetOutput(w io.Writer)

SetOutput sets the destination for the logger. By default, it is set to os.Stdout. It can be set to any io.Writer, such as a file or a buffer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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