Documentation ¶
Overview ¶
Package q provides quick and dirty debugging output for tired programmers.
q.Q() is a fast way to pretty-print variables. It's easier than typing fmt.Printf("%#v", whatever). The output will be colorized and nicely formatted. The output goes to $TMPDIR/q, away from the noise of stdout.
q exports a single Q() function. This is how you use it:
import "q" ... q.Q(a, b, c)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CallDepth allows setting the number of levels runtime.Caller will // skip when looking up the caller of the q.Q function. This allows // the `q` package to be wrapped by a project-specific wrapping function, // which would increase the depth by at least one. It's better to not // include calls to `q.Q` in released code at all and scrub them before, // a build is created, but in some cases it might be useful to provide // builds that do include the additional debug output provided by `q.Q`. // This also allows the consumer of the package to control what happens // with leftover `q.Q` calls. Defaults to 2, because the user code calls // q.Q(), which calls getCallerInfo(). CallDepth = 2 )
nolint: gochecknoglobals
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.