diff --git a/examples/mirc/auto/api/site.go b/examples/mirc/auto/api/site.go index f820c5b..40f308d 100644 --- a/examples/mirc/auto/api/site.go +++ b/examples/mirc/auto/api/site.go @@ -142,9 +142,9 @@ func RegisterSiteServant(e *gin.Engine, s Site, b SiteBinding, r SiteRender) { resp, err := s.PrevTweets(req) r.RenderPrevTweets(c, resp, err) } - router.Handle("POST", "/tweets/prev", h) router.Handle("HEAD", "/tweets/prev", h) router.Handle("GET", "/tweets/prev", h) + router.Handle("POST", "/tweets/prev", h) } router.Any("/tweets/next", func(c *gin.Context) { diff --git a/examples/mirc/main.go b/examples/mirc/main.go index d5adf54..48bb73c 100644 --- a/examples/mirc/main.go +++ b/examples/mirc/main.go @@ -11,7 +11,7 @@ import ( _ "github.com/alimy/mir-example/v3/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/chi/mirc/main.go.tmpl b/mirc/templates/chi/mirc/main.go.tmpl index 0430040..0499632 100644 --- a/mirc/templates/chi/mirc/main.go.tmpl +++ b/mirc/templates/chi/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/echo/mirc/main.go.tmpl b/mirc/templates/echo/mirc/main.go.tmpl index 9953240..4518517 100644 --- a/mirc/templates/echo/mirc/main.go.tmpl +++ b/mirc/templates/echo/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/fiber-v2/mirc/main.go.tmpl b/mirc/templates/fiber-v2/mirc/main.go.tmpl index 15c14b5..5fcf398 100644 --- a/mirc/templates/fiber-v2/mirc/main.go.tmpl +++ b/mirc/templates/fiber-v2/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/fiber/mirc/main.go.tmpl b/mirc/templates/fiber/mirc/main.go.tmpl index d9a7a49..194e95f 100644 --- a/mirc/templates/fiber/mirc/main.go.tmpl +++ b/mirc/templates/fiber/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/gin/mirc/main.go.tmpl b/mirc/templates/gin/mirc/main.go.tmpl index a68c0a9..162b4fc 100644 --- a/mirc/templates/gin/mirc/main.go.tmpl +++ b/mirc/templates/gin/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/hertz/mirc/main.go.tmpl b/mirc/templates/hertz/mirc/main.go.tmpl index 5814560..ce97cab 100644 --- a/mirc/templates/hertz/mirc/main.go.tmpl +++ b/mirc/templates/hertz/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/httprouter/mirc/main.go.tmpl b/mirc/templates/httprouter/mirc/main.go.tmpl index 4baacea..00a91cd 100644 --- a/mirc/templates/httprouter/mirc/main.go.tmpl +++ b/mirc/templates/httprouter/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/iris/mirc/main.go.tmpl b/mirc/templates/iris/mirc/main.go.tmpl index 7b04a75..21e4458 100644 --- a/mirc/templates/iris/mirc/main.go.tmpl +++ b/mirc/templates/iris/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/macaron/mirc/main.go.tmpl b/mirc/templates/macaron/mirc/main.go.tmpl index 38357a2..360d48d 100644 --- a/mirc/templates/macaron/mirc/main.go.tmpl +++ b/mirc/templates/macaron/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/templates/mux/mirc/main.go.tmpl b/mirc/templates/mux/mirc/main.go.tmpl index f458dab..b8d1e7c 100644 --- a/mirc/templates/mux/mirc/main.go.tmpl +++ b/mirc/templates/mux/mirc/main.go.tmpl @@ -11,7 +11,7 @@ import ( _ "{{ .PkgName }}/mirc/routes/v2" ) -//go:generate go run main.go +//go:generate go run $GOFILE func main() { log.Println("generate code start") opts := Options{ diff --git a/mirc/version/version.go b/mirc/version/version.go index 0504f67..8fb9bad 100644 --- a/mirc/version/version.go +++ b/mirc/version/version.go @@ -18,7 +18,7 @@ var ( BuildTime = "" // AppVer version of Mirc - AppVer = semver.MustParse("v3.0.0") + AppVer = semver.MustParse("v3.0.1") ) func ShowInfo() string {