<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                標準MVC下的main.go === ~~~ package main import ( "High-concurrent-spike-system/config" "github.com/kataras/iris" "github.com/kataras/iris/view" "log" ) func main() { // 1.創建iris 實例 app := iris.New() // 2.設置錯誤等級 if config.Config.Debug { app.Logger().SetLevel("debug") } // 3.注冊模板 var template *view.HTMLEngine if config.Config.Debug { template = iris.HTML("./web/views",".html").Layout("shared/layout.html").Reload(true) // .Reload 熱加載 }else{ template = iris.HTML("./web/views",".html").Layout("shared/layout.html").Reload(false) // .Reload 熱加載 } app.RegisterView(template) // 4.設置靜態文件目錄 app.StaticWeb("/assets","./web/assets") // 參數1:url前綴,參數二本地地址 // 5.設置異常頁面 app.OnAnyErrorCode(func(ctx iris.Context) { ctx.ViewData("message",ctx.Values().GetStringDefault("message","訪問頁面出錯")) ctx.ViewLayout("") ctx.View("shared/error.html") }) // 6.注冊控制器 // 7.啟動服務 err := app.Run( iris.Addr(":8085"), // 地址 iris.WithCharset("UTF-8"), // 國際化 iris.WithOptimizations, // 自動優化 iris.WithoutServerError(iris.ErrServerClosed), // 忽略框架錯誤 ) if err != nil { log.Println(err.Error()) panic(err.Error()) } } ~~~
                  <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>

                              哎呀哎呀视频在线观看