Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanupF ¶ added in v0.18.17
type CleanupF = func() error
func IgnoreErrs ¶
func Infallible ¶
func Infallible(fn func()) CleanupF
type CleanupFunc ¶
type CleanupFunc struct {
// contains filtered or unexported fields
}
type Cleanups ¶
type Cleanups struct {
// contains filtered or unexported fields
}
func (*Cleanups) ReAdd ¶
func (c *Cleanups) ReAdd(f CleanupFunc) CleanupFunc
ReAdd allows you to decide to run an already added cleanup function at a later time. Once readded, it will only be run at this time rather than both times. This is occasionally needed when you want to ensure some state is cleaned up right after it's created, but if more state is created later you ned to run this cleanup at that later time (e.g. closing a network connection in all cases).
Click to show internal directories.
Click to hide internal directories.