Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deferrer ¶
type Deferrer struct {
// contains filtered or unexported fields
}
Deferrer allows for collecting many defer statements for deferring later on.
func (*Deferrer) Cleanup ¶
func (d *Deferrer) Cleanup()
Cleanup calls the statements that were added to the Deferrer's stack, in reverse order (the defer statement works like a stack: https://tour.golang.org/flowcontrol/13)
func (*Deferrer) Defer ¶
func (d *Deferrer) Defer(f func())
Defer adds a function to the Deferrer's stack.
func (*Deferrer) DeferErrorable ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.