x

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: Apache-2.0 Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSafeCloser

func NewSafeCloser(x io.Closer) io.Closer

NewSafeCloser returns a io.Closer which ensures the underlying Close() is only called once. It's useful for cleanup of resources in functions.

func NewSafeMultiCloser

func NewSafeMultiCloser(closers ...io.Closer) io.Closer

NewSafeMultiCloser returns an io.Closer which ensures the that calling Close() on it calls Close() on each of the provided io.Closer(s) exactly once. Subsequent calls are not executed.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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