Documentation ¶
Overview ¶
Package trace provides a simple tracing facility for Go functions. Given the function below, program execution will be traced whenever the function is entered or exited.
func fn(p1 ptype1, p2 ptype2, ...) (r1 rtyp1, r2 rtype2, ...) { defer trace.Trace(0, "TRACE", p1, p2)(&r1, &r2) // ... }
The trace facility is disabled unless the variable Verbose is true and the environment variable GOLIB_TRACE is set to a pattern matching one of the traced functions. A pattern is a a comma-separated list of file-style patterns containing wildcards such as * and ?.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.