Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dropper ¶
type Dropper interface {
Drop() error
}
Dropper is an interface that represents a resource that needs to be finalised and its finalisation can fail.
type Error ¶
type Error struct { // The error that occurred when trying to close the resource. WhileDropping error // The error that occurred during the usage of a closable resource. Cause error }
Error contains two errors that occur when an error occurs while using a Droppable resource (e.g. a closable file) and while trying to drop the resource an error occurs.
type ErrorFnHandler ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is used to handle the Drop method of resources implementing the Dropper interface.
func NewHandler ¶
NewHandler creates a DropHandler that wraps the tryUntil variable to be used for closing resources.
type InDir ¶
type InDir struct {
// contains filtered or unexported fields
}
func ChangeDirectory ¶
func (InDir) ChangeBack ¶
type TryCreator ¶
type TryCreator interface {
CreateTry() TryUntil
}
type TryNTimesImpl ¶
type TryNTimesImpl struct {
// contains filtered or unexported fields
}
func (*TryNTimesImpl) Try ¶
func (t *TryNTimesImpl) Try(err error) (s Status)
Click to show internal directories.
Click to hide internal directories.