cleanup

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2020 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseFun

type CloseFun = func() error

CloseFun is a cleanup function to be executed.

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

Collection is a collection of cleanup operations.

func NewCollection

func NewCollection() *Collection

NewCollection returns a new Collection.

func (*Collection) Add

func (c *Collection) Add(cf CloseFun)

Add adds a CloseFun to the collection.

func (*Collection) Close

func (c *Collection) Close() []error

Close executes all cleanup operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL