dbg

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 10 Imported by: 0

README

A port of Rust's dbg! macro to Go:

dbg.Dbg(a, b, c)
// a = (int) 5, b = (string) "hello", c = (bool) true

For more information see the package documentation.

Licensed under the MIT License, Contributions welcome!

Documentation

Overview

package dbg provides a more helpful fmt.Println for debugging in Go.

dbg.Dbg wraps spew.Dump to additionally print the name of each argument and the filename and line number of the caller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dbg

func Dbg(args ...any)

Dbg pretty-prints its arguments with their names, types and values to os.Stdout.

func To added in v1.1.0

func To(w io.Writer, args ...any)

To pretty-prints its arguments with their names, types and values to the given Writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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