update go mod

This commit is contained in:
白茶清欢 2023-08-11 15:21:13 +08:00
parent c93cf01fe0
commit 817a4a8310
3 changed files with 17 additions and 4 deletions

7
go.mod
View File

@ -4,7 +4,7 @@ go 1.20
require ( require (
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20230609101214-16920b714d94 git.zhangdeman.cn/zhangdeman/exception v0.0.0-20230609101214-16920b714d94
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810063945-842592611562 git.zhangdeman.cn/zhangdeman/util v0.0.0-20230811070456-d6a489d5860b
github.com/gin-gonic/gin v1.9.1 github.com/gin-gonic/gin v1.9.1
github.com/go-playground/validator/v10 v10.15.0 github.com/go-playground/validator/v10 v10.15.0
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
@ -13,8 +13,11 @@ require (
) )
require ( require (
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20230811030300-6f850372c88c // indirect
git.zhangdeman.cn/zhangdeman/easymap v0.0.0-20230307094841-e437ba87af10 // indirect
git.zhangdeman.cn/zhangdeman/network v0.0.0-20230810064349-0948cd51c01d // indirect git.zhangdeman.cn/zhangdeman/network v0.0.0-20230810064349-0948cd51c01d // indirect
git.zhangdeman.cn/zhangdeman/wrapper v0.0.0-20230810031624-94c86f913f9c // indirect git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20230811032817-e6ad534a9a10 // indirect
git.zhangdeman.cn/zhangdeman/wrapper v0.0.0-20230811071513-cfc46e8d82e1 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect github.com/BurntSushi/toml v1.3.2 // indirect
github.com/Jeffail/gabs v1.4.0 // indirect github.com/Jeffail/gabs v1.4.0 // indirect
github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394 // indirect github.com/axgle/mahonia v0.0.0-20180208002826-3358181d7394 // indirect

10
go.sum
View File

@ -1,17 +1,27 @@
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20230811030300-6f850372c88c h1:Dan3iSVU6XTKt8r3/qixfPHPpfLZjkYlPmaJios7wtE=
git.zhangdeman.cn/zhangdeman/consts v0.0.0-20230811030300-6f850372c88c/go.mod h1:IXXaZkb7vGzGnGM5RRWrASAuwrVSNxuoe0DmeXx5g6k=
git.zhangdeman.cn/zhangdeman/easymap v0.0.0-20230307094841-e437ba87af10 h1:+Lg4vXFEiWVKjhUJdXuoP0AgjGT49oqJ3301STnZErk=
git.zhangdeman.cn/zhangdeman/easymap v0.0.0-20230307094841-e437ba87af10/go.mod h1:+Lc0zYF8sylRi75A7NGmObrLxugwAZa8WVpWh2eh5X0=
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220703050824-0679ce509241 h1:tBaET7SL1ElDQ8mI3A0sHNonmycB0fFp3n8vWo410YM= git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220703050824-0679ce509241 h1:tBaET7SL1ElDQ8mI3A0sHNonmycB0fFp3n8vWo410YM=
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220703050824-0679ce509241/go.mod h1:mIMM/t9BkrKHAcDCmarLCHQhHfWf0/ZjtcqJPboqmSA= git.zhangdeman.cn/zhangdeman/exception v0.0.0-20220703050824-0679ce509241/go.mod h1:mIMM/t9BkrKHAcDCmarLCHQhHfWf0/ZjtcqJPboqmSA=
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20230609101214-16920b714d94 h1:0A37IoVHd71aUADVueGE6MEUPFsakQS7KYHhwKd9MEE= git.zhangdeman.cn/zhangdeman/exception v0.0.0-20230609101214-16920b714d94 h1:0A37IoVHd71aUADVueGE6MEUPFsakQS7KYHhwKd9MEE=
git.zhangdeman.cn/zhangdeman/exception v0.0.0-20230609101214-16920b714d94/go.mod h1:Voc8J4ordx7nuMWpgACXXZULQy7ZIuBzcEIoS8VnDIw= git.zhangdeman.cn/zhangdeman/exception v0.0.0-20230609101214-16920b714d94/go.mod h1:Voc8J4ordx7nuMWpgACXXZULQy7ZIuBzcEIoS8VnDIw=
git.zhangdeman.cn/zhangdeman/network v0.0.0-20230810064349-0948cd51c01d h1:xDIqlRdXIM5U87dZCR2ua9uZ0cI8ryv12mLkinWdUFM= git.zhangdeman.cn/zhangdeman/network v0.0.0-20230810064349-0948cd51c01d h1:xDIqlRdXIM5U87dZCR2ua9uZ0cI8ryv12mLkinWdUFM=
git.zhangdeman.cn/zhangdeman/network v0.0.0-20230810064349-0948cd51c01d/go.mod h1:BPahs8KYF7x/YHB46oCMZXR8asEX48ZnwUGI0px9UiI= git.zhangdeman.cn/zhangdeman/network v0.0.0-20230810064349-0948cd51c01d/go.mod h1:BPahs8KYF7x/YHB46oCMZXR8asEX48ZnwUGI0px9UiI=
git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20230811032817-e6ad534a9a10 h1:orhcMAKrcOajsBJCgssnb9O8YcLsPJvWuXF511gs5dc=
git.zhangdeman.cn/zhangdeman/serialize v0.0.0-20230811032817-e6ad534a9a10/go.mod h1:CzX5/WwGDTnKmewarnjkK5XcSRbgszTQTdTL3OUc/s4=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220714054940-3cfcad0c6547 h1:ieuPrfZDDgwz9ANQdXQrGNWlKWN6bK3qOUC+XUAITrk= git.zhangdeman.cn/zhangdeman/util v0.0.0-20220714054940-3cfcad0c6547 h1:ieuPrfZDDgwz9ANQdXQrGNWlKWN6bK3qOUC+XUAITrk=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20220714054940-3cfcad0c6547/go.mod h1:zTir/0IWdK3E7n0GiaogyWHADAQnBtTdl2I6Z2/OPqw= git.zhangdeman.cn/zhangdeman/util v0.0.0-20220714054940-3cfcad0c6547/go.mod h1:zTir/0IWdK3E7n0GiaogyWHADAQnBtTdl2I6Z2/OPqw=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810035709-c318ed9f367d h1:oju8MKvJ82l0P0I3mnKrhcF3yw9Ck3AqOPh8fM0g32w= git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810035709-c318ed9f367d h1:oju8MKvJ82l0P0I3mnKrhcF3yw9Ck3AqOPh8fM0g32w=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810035709-c318ed9f367d/go.mod h1:trYFOShINaQBvinQrH4A0G2kfL22Y2lygEcAiGDt/sc= git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810035709-c318ed9f367d/go.mod h1:trYFOShINaQBvinQrH4A0G2kfL22Y2lygEcAiGDt/sc=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810063945-842592611562 h1:wo0r4mexqkPzQ1SZOw5z8A7FJ3ne1G6A/qWR3iaqlhw= git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810063945-842592611562 h1:wo0r4mexqkPzQ1SZOw5z8A7FJ3ne1G6A/qWR3iaqlhw=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810063945-842592611562/go.mod h1:trYFOShINaQBvinQrH4A0G2kfL22Y2lygEcAiGDt/sc= git.zhangdeman.cn/zhangdeman/util v0.0.0-20230810063945-842592611562/go.mod h1:trYFOShINaQBvinQrH4A0G2kfL22Y2lygEcAiGDt/sc=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230811070456-d6a489d5860b h1:vnmxYrNdX6f5sEVjjkM1fIR+i32kHJ4g9DJqug9KKek=
git.zhangdeman.cn/zhangdeman/util v0.0.0-20230811070456-d6a489d5860b/go.mod h1:Yum5+tgP+Wf1GWUAyQz1Qh8Ab9m5+90GYkYdzqVs0lA=
git.zhangdeman.cn/zhangdeman/wrapper v0.0.0-20230810031624-94c86f913f9c h1:n7lws3x/eR4DlcubTMepiLEgJikSN22sHYqJRaYWIkg= git.zhangdeman.cn/zhangdeman/wrapper v0.0.0-20230810031624-94c86f913f9c h1:n7lws3x/eR4DlcubTMepiLEgJikSN22sHYqJRaYWIkg=
git.zhangdeman.cn/zhangdeman/wrapper v0.0.0-20230810031624-94c86f913f9c/go.mod h1:pL3BbQdogtClFCrsiAyzBIQRWKSSIf3v2GuzZu6dGWY= git.zhangdeman.cn/zhangdeman/wrapper v0.0.0-20230810031624-94c86f913f9c/go.mod h1:pL3BbQdogtClFCrsiAyzBIQRWKSSIf3v2GuzZu6dGWY=
git.zhangdeman.cn/zhangdeman/wrapper v0.0.0-20230811071513-cfc46e8d82e1 h1:k2iu9KgRxeroytB+N+/XapAxt1di7o2pNTISjFlYDJ8=
git.zhangdeman.cn/zhangdeman/wrapper v0.0.0-20230811071513-cfc46e8d82e1/go.mod h1:kvjAbtGTo14gKCS0X4rxnb2sPkskHOUy2NXcx34t6Mw=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Jeffail/gabs v1.4.0 h1://5fYRRTq1edjfIrQGvdkcd22pkYUrHZ5YC/H2GJVAo= github.com/Jeffail/gabs v1.4.0 h1://5fYRRTq1edjfIrQGvdkcd22pkYUrHZ5YC/H2GJVAo=

View File

@ -9,13 +9,13 @@ package middleware
import ( import (
"fmt" "fmt"
"git.zhangdeman.cn/zhangdeman/wrapper"
"strings" "strings"
"time" "time"
"git.zhangdeman.cn/zhangdeman/gin/define" "git.zhangdeman.cn/zhangdeman/gin/define"
networkUtil "git.zhangdeman.cn/zhangdeman/network/util" networkUtil "git.zhangdeman.cn/zhangdeman/network/util"
"git.zhangdeman.cn/zhangdeman/util"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -46,7 +46,7 @@ func getTraceID(ctx *gin.Context) string {
time.Now().UnixNano()/1e6, time.Now().UnixNano()/1e6,
strings.ReplaceAll(networkUtil.IP.GetHostIP(), ".", ""), strings.ReplaceAll(networkUtil.IP.GetHostIP(), ".", ""),
strings.ReplaceAll(networkUtil.IP.GetRemoteIP(ctx.Request), ".", ""), strings.ReplaceAll(networkUtil.IP.GetRemoteIP(ctx.Request), ".", ""),
util.String.Md5(util.String.GenRandom("", 32)), wrapper.StringFromRandom(32, "").Md5(),
) )
} }