Make fs.CheckClose public to stop duplication

This commit is contained in:
Nick Craig-Wood
2015-11-28 18:13:08 +00:00
parent 7a24532224
commit ac65d8369e
4 changed files with 6 additions and 25 deletions

View File

@ -305,9 +305,9 @@ func ErrorLog(o interface{}, text string, args ...interface{}) {
OutputLog(o, text, args...)
}
// checkClose is a utility function used to check the return from
// CheckClose is a utility function used to check the return from
// Close in a defer statement.
func checkClose(c io.Closer, err *error) {
func CheckClose(c io.Closer, err *error) {
cerr := c.Close()
if *err == nil {
*err = cerr