From 59ee3c204a10db955eb5ceeb87dc5716e70a79de Mon Sep 17 00:00:00 2001 From: shiw Date: Mon, 14 Aug 2023 09:29:15 +0800 Subject: [PATCH] fix email regex rule,use gtest --- server/go.mod | 1 - server/utility/validate/validate_test.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/go.mod b/server/go.mod index 715474f..c20ea31 100644 --- a/server/go.mod +++ b/server/go.mod @@ -26,7 +26,6 @@ require ( github.com/qiniu/go-sdk/v7 v7.14.0 github.com/shirou/gopsutil/v3 v3.23.3 github.com/silenceper/wechat/v2 v2.1.4 - github.com/stretchr/testify v1.8.3 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.633 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sms v1.0.633 github.com/tencentyun/cos-go-sdk-v5 v0.7.41 diff --git a/server/utility/validate/validate_test.go b/server/utility/validate/validate_test.go index 44b46db..6a07e8a 100644 --- a/server/utility/validate/validate_test.go +++ b/server/utility/validate/validate_test.go @@ -1,11 +1,11 @@ package validate import ( - "github.com/stretchr/testify/assert" + "github.com/gogf/gf/v2/test/gtest" "testing" ) func TestIsEmail(t *testing.T) { b := IsEmail("QTT123456@163.com") - assert.True(t, b, "ok~") + gtest.Assert(true, b) }