From 3fc5ba73e6f8f9868602565375725e842601080d Mon Sep 17 00:00:00 2001 From: qydysky <32743305+qydysky@users.noreply.github.com> Date: Sun, 16 Oct 2022 03:04:25 +0800 Subject: [PATCH] fix --- file/FileWR.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file/FileWR.go b/file/FileWR.go index 6e237b1..b605a3c 100644 --- a/file/FileWR.go +++ b/file/FileWR.go @@ -185,7 +185,7 @@ func (t *File) Close() error { func (t *File) getRWCloser() { if t.Config.AutoClose || t.file == nil { - if !t.isExist() { + if !t.IsExist() { if f, e := os.Create(t.Config.FilePath); e != nil { panic(e) } else { @@ -244,7 +244,7 @@ func transfer(r io.ReadCloser, w io.WriteCloser, byteInSec int64) (e error) { return nil } -func (t *File) isExist() bool { +func (t *File) IsExist() bool { if len(t.Config.FilePath) > 4096 { panic(ErrFilePathTooLong) } -- 2.39.2