From ba73847b80606450b98f95939cdbd6d343a842df Mon Sep 17 00:00:00 2001 From: dudaodong Date: Wed, 12 Jan 2022 09:57:10 +0800 Subject: [PATCH] fix: fix some go report issue --- function/watcher_test.go | 2 +- internal/assert.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/function/watcher_test.go b/function/watcher_test.go index f59772c..2660a29 100644 --- a/function/watcher_test.go +++ b/function/watcher_test.go @@ -24,7 +24,7 @@ func TestWatcher(t *testing.T) { assert.Equal(false, w.excuting) w.Reset() - + assert.Equal(int64(0), w.startTime) assert.Equal(int64(0), w.stopTime) } diff --git a/internal/assert.go b/internal/assert.go index 80d42f5..3e817d8 100644 --- a/internal/assert.go +++ b/internal/assert.go @@ -18,7 +18,7 @@ const ( compareGreater ) -// Assert is a simple implementation of assertion, only for internal useage +// Assert is a simple implementation of assertion, only for internal usage type Assert struct { T *testing.T CaseName string @@ -154,9 +154,8 @@ func compare(x, y interface{}) int { default: if reflect.DeepEqual(x, y) { return compareEqual - } else { - return compareNotEqual } + return compareNotEqual } return compareNotEqual