<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                namespace ~~~ |-- routers | `-- router.go ~~~ 代碼: ~~~ package routers import ( admin "project/admin/controllers" "github.com/astaxie/beego" ) func init() { //初始化 namespace ns := beego.NewNamespace("/admin", beego.NSRouter("/user/add/:user_name:/:user_pwd:/:mobile", &admin.UserController{}, "*:Insert"), beego.NSNamespace("/user", beego.NSInclude( &admin.UserController{}, ), ), ) //注冊 namespace beego.AddNamespace(ns) } ~~~ ~~~ |-- admin | |--controllers | `-- user.go ~~~ 代碼: ~~~ package admin import ( "fmt" "github.com/astaxie/beego" ) type UserController struct { beego.Controller } func (c *UserController) URLMapping() { c.Mapping("Index", c.Index) c.Mapping("Test", c.Test) } // @router /index/ func (this *UserController) Index() { this.Ctx.WriteString("這是注釋路由 user/index") } // @router /test/user_name/:user_name/user_id/:user_id [get] func (this *UserController) Test() { user_name := this.Ctx.Input.Param(":user_name") values := this.Ctx.Input.Params() str := fmt.Sprintln(values) this.Ctx.WriteString("這是注釋路由 user/test , values is " + str + " user name is " + user_name) } func (this *UserController) Insert() { user_name := this.Ctx.Input.Param(":user_name") values := this.Ctx.Input.Params() str := fmt.Sprintln(values) this.Ctx.WriteString("這是namespace user/add , values is " + str + " user name is " + user_name) } ~~~ 瀏覽器訪問: http://127.0.0.1:8080/admin/user/index 瀏覽器輸出: 這是注釋路由 user/index 瀏覽器訪問: http://127.0.0.1:8080/admin/user/test/user_name/user1/user_id/123 瀏覽器輸出: 這是注釋路由 user/test , values is map[:user_name:user1 :user_id:123] user name is user1 瀏覽器輸出: http://127.0.0.1:8080/admin/user/add/user1/md5pwd/15688889999 瀏覽器輸出: 這是namespace user/add , values is map[:user_name:user1 :user_pwd:md5pwd :mobile:15688889999] user name is user1
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看