godbg

package module
v0.0.0-...-6f94eff Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2019 License: MIT Imports: 5 Imported by: 0

README

godbg 🐛 Build Status

godbg is an implementation of the Rust2018 builtin debugging macro dbg.

The purpose of this package is to provide a better and more effective workflow for people who are "print debuggers".

go get github.com/tylerwince/godbg

The old way:


package main

import "fmt"

func main() {
    a := 1
    fmt.Printf("My variable: a is equal to: %d", a)
}

outputs:

My variable: a is equal to: 1

The new (and better) way


package main

import . "github.com/tylerwince/godbg"

func main() {
    a := 1
    Dbg(a)
}

outputs:

[main.go:7] a = 1
This project is a work in progress and all feedback is appreciated.

The next features that are planned are:

  • Tests
  • Fancy Mode (display information about the whole callstack)
  • Performance Optimizations
  • Typing information

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dbg

func Dbg(exp interface{}) interface{}

Dbg will print to either stderr or stdout the output of the expression passed

Types

This section is empty.

Jump to

Keyboard shortcuts

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