Skip to content

Commit

Permalink
adapt go-mir v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alimy committed Jul 27, 2023
1 parent 0ca44c4 commit 719e40c
Show file tree
Hide file tree
Showing 52 changed files with 108 additions and 106 deletions.
28 changes: 15 additions & 13 deletions docs/content.zh/docs/tutorials/interface-define.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ type User struct {

如上示例,使用gin引擎样式代码生成器将生成如下代码:
```go
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 LoginReq struct {
Name string `json:"name"`
Passwd string `json:"passwd"`
Expand All @@ -111,6 +124,8 @@ type User struct {
}
type User interface {
_default_
// Chain provide handlers chain for gin
Chain() gin.HandlersChain
Expand All @@ -119,17 +134,4 @@ type User struct {
mustEmbedUnimplementedUserServant()
}
type UserBinding interface {
BindLogin(c *gin.Context) (*LoginReq, mir.Error)
mustEmbedUnimplementedUserBinding()
}
type UserRender interface {
RenderLogin(c *gin.Context, data *LoginResp, err mir.Error)
RenderLogout(c *gin.Context, err mir.Error)
mustEmbedUnimplementedUserRender()
}
```
2 changes: 1 addition & 1 deletion engine/chi/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/alimy/mir/engine/chi/v4

go 1.19

require github.com/alimy/mir/v4 v4.0.0-rc.1
require github.com/alimy/mir/v4 v4.0.0
4 changes: 2 additions & 2 deletions engine/chi/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
2 changes: 1 addition & 1 deletion engine/echo/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir/engine/echo/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/labstack/echo/v4 v4.10.2
)

Expand Down
4 changes: 2 additions & 2 deletions engine/echo/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
2 changes: 1 addition & 1 deletion engine/fiber/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir/engine/fiber/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/gofiber/fiber/v2 v2.47.0
)

Expand Down
4 changes: 2 additions & 2 deletions engine/fiber/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/gofiber/fiber/v2 v2.47.0 h1:EN5lHVCc+Pyqh5OEsk8fzRiifgwpbrP0rulQ4iNf3fs=
Expand Down
2 changes: 1 addition & 1 deletion engine/gin/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir/engine/gin/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/gin-gonic/gin v1.9.1
)

Expand Down
4 changes: 2 additions & 2 deletions engine/gin/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
Expand Down
2 changes: 1 addition & 1 deletion engine/hertz/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir/engine/hertz/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/cloudwego/hertz v0.6.5
)

Expand Down
4 changes: 2 additions & 2 deletions engine/hertz/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/bytedance/go-tagexpr/v2 v2.9.2 h1:QySJaAIQgOEDQBLS3x9BxOWrnhqu5sQ+f6HaZIxD39I=
github.com/bytedance/go-tagexpr/v2 v2.9.2/go.mod h1:5qsx05dYOiUXOUgnQ7w3Oz8BYs2qtM/bJokdLb79wRM=
github.com/bytedance/gopkg v0.0.0-20220413063733-65bf48ffb3a7 h1:PtwsQyQJGxf8iaPptPNaduEIu9BnrNms+pcRdHAxZaM=
Expand Down
2 changes: 1 addition & 1 deletion engine/httprouter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/alimy/mir/engine/httprouter/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/julienschmidt/httprouter v1.3.0
)
4 changes: 2 additions & 2 deletions engine/httprouter/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
2 changes: 1 addition & 1 deletion engine/iris/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir/engine/iris/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/kataras/iris/v12 v12.2.0
)

Expand Down
4 changes: 2 additions & 2 deletions engine/iris/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk=
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0=
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM=
github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU=
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
Expand Down
2 changes: 1 addition & 1 deletion engine/macaron/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir/engine/macaron/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
gopkg.in/macaron.v1 v1.5.0
)

Expand Down
4 changes: 2 additions & 2 deletions engine/macaron/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
2 changes: 1 addition & 1 deletion engine/mux/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/alimy/mir/engine/mux/v4

go 1.19

require github.com/alimy/mir/v4 v4.0.0-rc.1
require github.com/alimy/mir/v4 v4.0.0
4 changes: 2 additions & 2 deletions engine/mux/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir-example/v4
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/gin-gonic/gin v1.9.1
)

Expand Down
4 changes: 2 additions & 2 deletions examples/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
Expand Down
2 changes: 1 addition & 1 deletion examples/mirc/auto/api/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/mirc/auto/api/v2/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/mirc/auto/api/v3/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/mirc/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
func main() {
log.Println("generate code start")
opts := Options{
UseGin(),
SinkPath("auto"),
WatchCtxDone(true),
RunMode(InSerialMode),
AssertType[*gin.Context](),
GeneratorName(GeneratorGin),
WatchCtxDone(true),
SinkPath("auto"),
}
if err := Generate(opts); err != nil {
log.Fatal(err)
Expand Down
4 changes: 2 additions & 2 deletions mirc/templates/chi/go.mod.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module {{ .PkgName }}
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/go-chi/chi/v5 v5.0.8
github.com/alimy/mir/v4 v4.0.0
github.com/go-chi/chi/v5 v5.0.10
)

{{if notEmptyStr .MirPkgName }}
Expand Down
8 changes: 4 additions & 4 deletions mirc/templates/chi/go.sum.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0=
github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
6 changes: 3 additions & 3 deletions mirc/templates/chi/mirc/gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
func main() {
log.Println("generate code start")
opts := Options{
UseChi(),
SinkPath("auto"),
WatchCtxDone(true),
RunMode(InSerialMode),
AssertType[*chi.Context](),
GeneratorName(GeneratorChi),
WatchCtxDone(true),
SinkPath("auto"),
}
if err := Generate(opts); err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/echo/go.mod.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/alimy/mir-echo
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/labstack/echo/v4 v4.10.2
)

Expand Down
6 changes: 3 additions & 3 deletions mirc/templates/echo/mirc/gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
func main() {
log.Println("generate code start")
opts := Options{
UseEcho(),
SinkPath("auto"),
WatchCtxDone(true),
RunMode(InSerialMode),
AssertType[echo.Context](),
GeneratorName(GeneratorEcho),
WatchCtxDone(true),
SinkPath("auto"),
}
if err := Generate(opts); err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/fiber/go.mod.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module {{ .PkgName }}
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/gofiber/fiber/v2 v2.47.0
)

Expand Down
4 changes: 2 additions & 2 deletions mirc/templates/fiber/go.sum.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/gofiber/fiber/v2 v2.47.0 h1:EN5lHVCc+Pyqh5OEsk8fzRiifgwpbrP0rulQ4iNf3fs=
Expand Down
8 changes: 4 additions & 4 deletions mirc/templates/fiber/mirc/gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
func main() {
log.Println("generate code start")
opts := Options{
UseFiber(),
SinkPath("auto"),
NoneQuery(true),
WatchCtxDone(true),
RunMode(InSerialMode),
AssertType[*fiber.Ctx](),
GeneratorName(GeneratorFiber),
WatchCtxDone(true),
NoneQuery(true),
SinkPath("auto"),
}
if err := Generate(opts); err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/gin/go.mod.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module {{ .PkgName }}
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/gin-gonic/gin v1.9.1
)

Expand Down
4 changes: 2 additions & 2 deletions mirc/templates/gin/go.sum.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
Expand Down
6 changes: 3 additions & 3 deletions mirc/templates/gin/mirc/gen.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
func main() {
log.Println("generate code start")
opts := Options{
UseGin(),
SinkPath("auto"),
WatchCtxDone(true),
RunMode(InSerialMode),
AssertType[*gin.Context](),
GeneratorName(GeneratorGin),
WatchCtxDone(true),
SinkPath("auto"),
}
if err := Generate(opts); err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/hertz/go.mod.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module {{ .PkgName }}
go 1.19

require (
github.com/alimy/mir/v4 v4.0.0-rc.1
github.com/alimy/mir/v4 v4.0.0
github.com/cloudwego/hertz v0.6.6
)

Expand Down
4 changes: 2 additions & 2 deletions mirc/templates/hertz/go.sum.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/alimy/mir/v4 v4.0.0-rc.1 h1:x9rKbD6I4INqwvgmSI4Vbswff66ANDnPmCySMLzEV4w=
github.com/alimy/mir/v4 v4.0.0-rc.1/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/alimy/mir/v4 v4.0.0 h1:MzGfmoLjjvR69jbZEmpKJO3tUuqB0RGRv1UWPbtukBg=
github.com/alimy/mir/v4 v4.0.0/go.mod h1:d58dBvw2KImcVbAUANrciEV/of0arMNsI9c/5UNCMMc=
github.com/bytedance/go-tagexpr/v2 v2.9.2 h1:QySJaAIQgOEDQBLS3x9BxOWrnhqu5sQ+f6HaZIxD39I=
github.com/bytedance/go-tagexpr/v2 v2.9.2/go.mod h1:5qsx05dYOiUXOUgnQ7w3Oz8BYs2qtM/bJokdLb79wRM=
github.com/bytedance/gopkg v0.0.0-20220413063733-65bf48ffb3a7 h1:PtwsQyQJGxf8iaPptPNaduEIu9BnrNms+pcRdHAxZaM=
Expand Down
Loading

0 comments on commit 719e40c

Please sign in to comment.