cleanup

package
v0.7.22 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MPL-2.0 Imports: 1 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 and empties the collection.

Jump to

Keyboard shortcuts

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