Documentation
¶
Overview ¶
Package closers contains utilities for dealing with io.Closer implementations
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Noop io.Closer = &noopCloser{}
Noop is an io.Closer implementation that does nothing.
Functions ¶
Types ¶
type MultiCloser ¶ added in v1.4.1
The MultiCloser type is a collection of io.Closer implementations that can be collected and closed at once.
func (*MultiCloser) Add ¶ added in v1.4.1
func (c *MultiCloser) Add(cl io.Closer)
Add a closer to the MultiCloser. It will be closed when calling MultiCloser.Close.
func (*MultiCloser) Close ¶ added in v1.4.1
func (c *MultiCloser) Close() error
Close all io.Closer implementations in the MultiCloser. Returns any non-nil errors as a multi-error.
Click to show internal directories.
Click to hide internal directories.