chore: use time.Now() instead of timex.Time() because go optimized it (#1860)

This commit is contained in:
Kevin Wan
2022-05-03 19:51:47 +08:00
committed by GitHub
parent ac321fc146
commit bab72b7630
7 changed files with 21 additions and 22 deletions

View File

@@ -4,8 +4,7 @@ import (
"fmt"
"runtime"
"strings"
"github.com/zeromicro/go-zero/core/timex"
"time"
)
func getCaller(callDepth int) string {
@@ -18,7 +17,7 @@ func getCaller(callDepth int) string {
}
func getTimestamp() string {
return timex.Time().Format(timeFormat)
return time.Now().Format(timeFormat)
}
func prettyCaller(file string, line int) string {