From 83a61640112f4226794939c3333db76c3a45d1b3 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 19 May 2021 10:09:00 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=B7=BB=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=AE=89=E5=85=A8=E5=86=99=E5=85=A5=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- file.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/file.go b/file.go index 8038c55..bfb2115 100644 --- a/file.go +++ b/file.go @@ -14,7 +14,6 @@ import ( "io" "io/ioutil" "os" - "path" "path/filepath" "strings" ) @@ -23,7 +22,7 @@ import ( func (GuluFile) WriteFileSafer(writePath string, data []byte, perm os.FileMode) error { // credits: https://github.com/vitessio/vitess/blob/master/go/ioutil2/ioutil.go - dir, name := path.Split(writePath) + dir, name := filepath.Split(writePath) f, err := ioutil.TempFile(dir, name) if nil != err { return err