x

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 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