From bb47159540736a2e67e60ee3ebb75bd87f87d42d Mon Sep 17 00:00:00 2001 From: zihengCat Date: Thu, 24 Jun 2021 13:41:52 +0800 Subject: [PATCH] skip unnecessary variable assignment in timeFormat --- recovery.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recovery.go b/recovery.go index 85199591..3101fe28 100644 --- a/recovery.go +++ b/recovery.go @@ -167,6 +167,5 @@ func function(pc uintptr) []byte { // timeFormat returns a customized time string for logger. func timeFormat(t time.Time) string { - timeString := t.Format("2006/01/02 - 15:04:05") - return timeString + return t.Format("2006/01/02 - 15:04:05") }