From 7b8239457b31c2c83c71b907230781a0efc920a4 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Fri, 30 Jun 2023 10:56:06 +0800 Subject: [PATCH] upgrade github.com/alimy/mir/v4 => v4.0.0-alpha.6 --- auto/api/v1/alipay_priv.go | 13 +++++++++++++ auto/api/v1/alipay_pub.go | 13 ------------- go.mod | 3 +-- go.sum | 6 ++---- mirc/gen.go | 3 ++- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/auto/api/v1/alipay_priv.go b/auto/api/v1/alipay_priv.go index 02500522..6028607d 100644 --- a/auto/api/v1/alipay_priv.go +++ b/auto/api/v1/alipay_priv.go @@ -12,6 +12,19 @@ import ( "github.com/rocboss/paopao-ce/internal/model/web" ) +type _binding_ interface { + Bind(*gin.Context) mir.Error +} + +type _render_ interface { + Render(*gin.Context) +} + +type _default_ interface { + Bind(*gin.Context, any) mir.Error + Render(*gin.Context, any, mir.Error) +} + type AlipayPriv interface { _default_ diff --git a/auto/api/v1/alipay_pub.go b/auto/api/v1/alipay_pub.go index 10e067ad..b31172ad 100644 --- a/auto/api/v1/alipay_pub.go +++ b/auto/api/v1/alipay_pub.go @@ -12,19 +12,6 @@ import ( "github.com/rocboss/paopao-ce/internal/model/web" ) -type _binding_ interface { - Bind(*gin.Context) mir.Error -} - -type _render_ interface { - Render(*gin.Context) -} - -type _default_ interface { - Bind(*gin.Context, any) mir.Error - Render(*gin.Context, any, mir.Error) -} - type AlipayPub interface { _default_ diff --git a/go.mod b/go.mod index aeed41e7..1370454c 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 github.com/alimy/cfg v0.3.0 - github.com/alimy/mir/engine/gin/v4 v4.0.0-alpha.5 - github.com/alimy/mir/v4 v4.0.0-alpha.5 + github.com/alimy/mir/v4 v4.0.0-alpha.6 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/allegro/bigcache/v3 v3.1.0 github.com/bytedance/sonic v1.9.1 diff --git a/go.sum b/go.sum index 710dea0c..8508b359 100644 --- a/go.sum +++ b/go.sum @@ -125,10 +125,8 @@ github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:C github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= github.com/alimy/cfg v0.3.0 h1:9xgA0QWVCPSq9fFNRcYahVCAX22IL9ts2wrTQPfAStY= github.com/alimy/cfg v0.3.0/go.mod h1:rOxbasTH2srl6StAjNF5Vyi8bfrdkl3fLGmOYtSw81c= -github.com/alimy/mir/engine/gin/v4 v4.0.0-alpha.5 h1:VcsxrgQthRHZiBgKhQwl6jcx8RUhrrLr0KYY67tCvtI= -github.com/alimy/mir/engine/gin/v4 v4.0.0-alpha.5/go.mod h1:QGiJqcbwlCOC86hoIr7TS8QJvtn1+AvKwlV7FFioqb8= -github.com/alimy/mir/v4 v4.0.0-alpha.5 h1:su6Qu57VYGFKi1V0+4kWKhn3Wq1DuDz9Wl82h+IQc0c= -github.com/alimy/mir/v4 v4.0.0-alpha.5/go.mod h1:X09f2IOQ4NTyJFKJ10S+J7Jk988T5IvvprwTijQZAsg= +github.com/alimy/mir/v4 v4.0.0-alpha.6 h1:bCFZ0HwFlT3Gsk5TgRGRyI4Xc/BCMR2VvuNghnTTHC0= +github.com/alimy/mir/v4 v4.0.0-alpha.6/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCGbIoaBok2uZvkD7QXp2+Wis= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk= diff --git a/mirc/gen.go b/mirc/gen.go index 5c0b76c6..69e9933d 100644 --- a/mirc/gen.go +++ b/mirc/gen.go @@ -12,8 +12,8 @@ import ( . "github.com/alimy/mir/v4/core" . "github.com/alimy/mir/v4/engine" + "github.com/gin-gonic/gin" - _ "github.com/alimy/mir/engine/gin/v4" _ "github.com/rocboss/paopao-ce/mirc/admin/v1" _ "github.com/rocboss/paopao-ce/mirc/bot/v1" _ "github.com/rocboss/paopao-ce/mirc/localoss/v1" @@ -26,6 +26,7 @@ func main() { log.Println("generate code start") opts := Options{ RunMode(InSerialMode), + AssertType[*gin.Context](), GeneratorName(GeneratorGin), WatchCtxDone(true), SinkPath("../auto"),