Documentation ¶
Index ¶
- func Err() io.Writer
- func ErrString() string
- func NoOutput() bool
- func Out() io.Writer
- func OutString() string
- func Pdbgf(format string, args ...interface{}) string
- func Perrdbgf(format string, args ...interface{}) string
- func ResetIOs()
- func SetBuffers(apdbg *Pdbg)
- func ShouldEqualNL(actual interface{}, expected ...interface{}) string
- type Option
- type Pdbg
- func (pdbg *Pdbg) Err() io.Writer
- func (pdbg *Pdbg) ErrString() string
- func (pdbg *Pdbg) NoOutput() bool
- func (pdbg *Pdbg) Out() io.Writer
- func (pdbg *Pdbg) OutString() string
- func (pdbg *Pdbg) Pdbgf(format string, args ...interface{}) string
- func (pdbg *Pdbg) ResetIOs()
- func (pdbg *Pdbg) SetExcludes(excludes []string)
- func (pdbg *Pdbg) SetSkips(skips []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrString ¶
func ErrString() string
ErrString returns the string for error messages for the global pdbg instance. It flushes the err buffer. If err is set to os.StdErr, returns an empty string
func NoOutput ¶
func NoOutput() bool
NoOutput checks if there is any output recorded on Stdout or Stderr
func OutString ¶
func OutString() string
OutString returns the string for out messages for the global pdbg instance. It flushes the out buffer. If out is set to os.Stdout, returns an empty string
func SetBuffers ¶
func SetBuffers(apdbg *Pdbg)
SetBuffers is an option for replacing stdout and stderr by bytes buffers (in a bufio.Writer). If apdbg is nil, set for the global pdbg instance
func ShouldEqualNL ¶
func ShouldEqualNL(actual interface{}, expected ...interface{}) string
ShouldEqualNL is a custom goconvey assertion to ignore differences with func id and lines: `[globalPdbgExcludeTest:16] (func.019:167)` would be equal to [globalPdbgExcludeTest] (func) (see https://github.com/smartystreets/goconvey/wiki/Custom-Assertions)
Types ¶
type Option ¶
type Option func(*Pdbg)
Option set an option for a Pdbg http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
func OptExcludes ¶
OptExcludes is an option to set excludes at the creation of a pdbg
type Pdbg ¶
type Pdbg struct {
// contains filtered or unexported fields
}
Pdbg allows to print debug message with indent and function name added
func (*Pdbg) Err ¶
Err returns a writer for error messages for a given pdbg instance. By default, os.StdErr
func (*Pdbg) ErrString ¶
ErrString returns the string for error messages for a given pdbg instance. It flushes the err buffer. If err is set to os.StdErr, returns an empty string
func (*Pdbg) NoOutput ¶
NoOutput checks if there is any output recorded on Stdout or Stderr for a given pdbg instance.
func (*Pdbg) Out ¶
Out returns a writer for normal messages for a given pdbg instance. By default, os.StdOut
func (*Pdbg) OutString ¶
OutString returns the string for out messages for a given pdbg instance. It flushes the out buffer. If out is set to os.Stdout, returns an empty string
func (*Pdbg) Pdbgf ¶
Pdbgf uses custom Pdbg variable for printing strings, with indent and function name
func (*Pdbg) ResetIOs ¶
func (pdbg *Pdbg) ResetIOs()
ResetIOs reset the out and err buffer (unless they were the default stdout and stderr, in which case it does nothing)
func (*Pdbg) SetExcludes ¶
SetExcludes set excludes on a pdbg (nil for global pdbg)