Merge pull request #5253 from de1acr0ix/fix-run-twice

fix: Beego web.Run() runs the server twice
This commit is contained in:
Ming Deng
2023-06-19 17:20:12 +08:00
committed by GitHub

View File

@@ -50,8 +50,9 @@ func AddAPPStartHook(hf ...hookfunc) {
func Run(params ...string) { func Run(params ...string) {
if len(params) > 0 && params[0] != "" { if len(params) > 0 && params[0] != "" {
BeeApp.Run(params[0]) BeeApp.Run(params[0])
} } else {
BeeApp.Run("") BeeApp.Run("")
}
} }
// RunWithMiddleWares Run beego application with middlewares. // RunWithMiddleWares Run beego application with middlewares.