File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ import (
2727 " github.com/zeromicro/go-zero/core/service"
2828 " github.com/zeromicro/go-zero/rest"
2929 " github.com/zeromicro/go-zero/rest/httpx"
30- " github.com/zeromicro/zero-contrib/router/gin"
31- stdgin " github.com/gin-gonic/gin"
30+ zerogin " github.com/zeromicro/zero-contrib/router/gin"
31+ " github.com/gin-gonic/gin"
3232)
3333
3434type CommonPathID struct {
@@ -46,11 +46,12 @@ func (c *CommonPathID) String() string {
4646}
4747
4848func init () {
49- stdgin .SetMode (stdgin .ReleaseMode )
49+ gin .SetMode (gin .ReleaseMode )
5050}
5151
5252func main () {
53- r := gin.NewRouter ()
53+ server := gin.New ()
54+ r := zerogin.NewRouter (r)
5455 engine := rest.MustNewServer (rest.RestConf {
5556 ServiceConf: service.ServiceConf {
5657 Log: logx.LogConf {
You can’t perform that action at this time.
0 commit comments