mirror of
https://git.vectorsigma.ru/public/CasaOS.git
synced 2026-07-28 20:17:36 +00:00
13 lines
221 B
Go
13 lines
221 B
Go
package fs
|
|
|
|
import "io"
|
|
|
|
// CheckClose is a utility function used to check the return from
|
|
// Close in a defer statement.
|
|
func CheckClose(c io.Closer, err *error) {
|
|
cerr := c.Close()
|
|
if *err == nil {
|
|
*err = cerr
|
|
}
|
|
}
|