skip unnecessary variable assignment in timeFormat (#2761)

This commit is contained in:
ziheng 2021-06-24 15:31:38 +08:00 committed by GitHub
parent be860ec157
commit 09f6cff92a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")
}