astidefer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseFunc

type CloseFunc func() error

CloseFunc is a method that closes something

type Closer

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

Closer is an object that can close things

func NewCloser

func NewCloser() *Closer

NewCloser creates a new closer

func (*Closer) Add

func (c *Closer) Add(f CloseFunc)

Add adds a close func at the beginning of the list

func (*Closer) Close

func (c *Closer) Close() (err error)

Close implements the io.Closer interface

func (*Closer) NewChild

func (c *Closer) NewChild() (child *Closer)

NewChild creates a new child closer

Jump to

Keyboard shortcuts

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