Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SafeCloser ¶ added in v1.2.0
SafeCloser is a reuesable safe closer.
func NewSafeCloser ¶
func NewSafeCloser(x io.Closer) SafeCloser
NewSafeCloser returns a io.Closer which ensures the underlying Close() is only called once. It's useful for cleanup of resources in functions.
Click to show internal directories.
Click to hide internal directories.