commit d4e21b1fff6be55635313efe2db1f8df38d792e6
parent 34b5ad6fd5e6bb9c3e0190467eb54a40ba9ce45d
Author: Matsuda Kenji <info@mtkn.jp>
Date: Sat, 6 Jan 2024 08:04:30 +0900
add comment
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/auth.go b/auth.go
@@ -33,6 +33,8 @@ func (af *AuthFile) Stat() (*FileInfo, error) {
return &FileInfo{Stat: s}, nil
}
+// Close closes af and its underlying reader/writer if they implement io.Closer.
+// TODO: should I left W/R not closed?
func (af *AuthFile) Close() error {
var we, re error
if w, ok := af.W.(io.Closer); ok {
@@ -46,5 +48,6 @@ func (af *AuthFile) Close() error {
}
return nil
}
+
func (af *AuthFile) Read(p []byte) (int, error) { return af.R.Read(p) }
func (af *AuthFile) Write(p []byte) (int, error) { return af.W.Write(p) }