mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
1 parent
4d0a909de5
commit
b85d7457c1
13 files changed
+98
-42
No files matched your search
+4
-2
@@ -55,11 +55,13 @@ type Reader struct {
|
||||
encryption *encryptionState
|
||||
}
|
||||
|
||||
// Close 关闭阅读器
|
||||
// Close 关闭阅读器持有的文件,重复调用不再关闭底层文件
|
||||
// 返回: error 错误信息
|
||||
func (r *Reader) Close() error {
|
||||
if r.Closer != nil {
|
||||
return r.Closer.Close()
|
||||
closer := r.Closer
|
||||
r.Closer = nil
|
||||
return closer.Close()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user