safeclose

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: Apache-2.0 Imports: 4 Imported by: 176

Documentation

Overview

Package safeclose provides utilities for safe closing of I/O resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(obj interface{}) error

Close closes closable I/O stream.

func CloseAll

func CloseAll(objs ...interface{}) (details []error, errOccured error)

CloseAll tries to close all objects and return all errors (there are nils if there was no errors).

Types

type CloserWithoutErr

type CloserWithoutErr interface {
	Close()
}

CloserWithoutErr is similar interface to GoLang Closer but Close() does not return error

Jump to

Keyboard shortcuts

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