From d70b86bda7b5c9d36e90d759f70a870d0146870d Mon Sep 17 00:00:00 2001 From: zen Date: Tue, 13 Feb 2024 23:38:49 +0800 Subject: [PATCH] =?UTF-8?q?-=E6=9B=BF=E6=8D=A2=E4=B8=BA=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- replace/filename.go | 3 +++ unit_test.go | 18 ------------------ 2 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 unit_test.go diff --git a/replace/filename.go b/replace/filename.go index 8650f6f..04a9d70 100644 --- a/replace/filename.go +++ b/replace/filename.go @@ -61,6 +61,9 @@ func ForFileName(name string) string { return nStr } func Effective(s string) bool { + if s == "-" { + s = " " + } if s == " " { return true } diff --git a/unit_test.go b/unit_test.go deleted file mode 100644 index d0a5965..0000000 --- a/unit_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "log/slog" - "processAll/model" - "processAll/storage/mysql" - "testing" -) - -func TestUnit(t *testing.T) { - mysql.SetEngine() - i := new(model.Image) - all, err := i.Sum() - if err != nil { - return - } - slog.Debug("all image", slog.Int64("共处理的图片数", all)) -}