From 9fd571830d62fce13a06743512b00c8582ebb2da Mon Sep 17 00:00:00 2001 From: Yongzheng Lai Date: Tue, 1 Sep 2015 17:52:44 +0800 Subject: [PATCH] Update beego.go Maybe the `Hard Coding` should have a higher priority --- beego.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beego.go b/beego.go index cfebfbea..516e3116 100644 --- a/beego.go +++ b/beego.go @@ -259,6 +259,8 @@ func AddAPPStartHook(hf hookfunc) { // beego.Run(":8089") // beego.Run("127.0.0.1:8089") func Run(params ...string) { + initBeforeHttpRun() + if len(params) > 0 && params[0] != "" { strs := strings.Split(params[0], ":") if len(strs) > 0 && strs[0] != "" { @@ -268,7 +270,6 @@ func Run(params ...string) { HttpPort, _ = strconv.Atoi(strs[1]) } } - initBeforeHttpRun() if EnableAdmin { go beeAdminApp.Run()