提交 42c85be5 authored 作者: mooncake9527's avatar mooncake9527

cost

上级 81dc6145
......@@ -248,7 +248,7 @@ func SetVal(ctx context.Context, key string, val interface{}) context.Context {
func AddApiCost(c *gin.Context, appName string, start time.Time) {
cost := c.Writer.Header().Get(KeyCost)
currentCost := fmt.Sprintf("%s:%d", appName, time.Since(start).Milliseconds())
currentCost := fmt.Sprintf("%s:%s", appName, time.Since(start).String())
if cost == "" {
cost = currentCost
} else {
......
......@@ -69,10 +69,8 @@ require (
)
require (
github.com/RussellLuo/slidingwindow v0.0.0-20200528002341-535bb99d338b
github.com/bwmarrin/snowflake v0.3.0
github.com/duke-git/lancet/v2 v2.3.4
github.com/go-redis/redis v6.15.9+incompatible
github.com/mojocn/base64Captcha v1.3.8
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
)
......@@ -80,8 +78,6 @@ require (
require (
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.37.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
golang.org/x/image v0.23.0 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论