mirror of
https://github.com/rclone/rclone.git
synced 2025-08-15 00:02:35 +02:00
Make fs.CheckClose public to stop duplication
This commit is contained in:
4
fs/fs.go
4
fs/fs.go
@ -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
|
||||
|
Reference in New Issue
Block a user