Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeClock ¶
type FakeClock struct { // Value is the embedded time value. This value is advanced // by calling Sleep(). Value time.Time }
FakeClock is an IClock which returns the embedded time value instead of the real time.
type FakePrinter ¶
FakePrinter prints everything to an internal buffer. The buffer can be obtained by calling String().
func (*FakePrinter) PrintMessagef ¶
func (p *FakePrinter) PrintMessagef(format string, a ...interface{})
func (*FakePrinter) PrintMessageln ¶
func (p *FakePrinter) PrintMessageln(a ...interface{})
func (*FakePrinter) PrintOutputln ¶
func (p *FakePrinter) PrintOutputln(a ...interface{})
func (FakePrinter) String ¶
func (p FakePrinter) String() string
type IPrinter ¶
type IPrinter interface { PrintMessageln(a ...interface{}) PrintMessagef(format string, a ...interface{}) PrintOutputln(a ...interface{}) }
IPrinter provides a swappable output/message printing interface so that during testing output/messages can be captured.
type RealPrinter ¶
type RealPrinter struct{}
RealPrinter prints everything to stdout.
func (RealPrinter) PrintMessagef ¶
func (_ RealPrinter) PrintMessagef(format string, a ...interface{})
func (RealPrinter) PrintMessageln ¶
func (_ RealPrinter) PrintMessageln(a ...interface{})
func (RealPrinter) PrintOutputln ¶
func (_ RealPrinter) PrintOutputln(a ...interface{})
Click to show internal directories.
Click to hide internal directories.