From 00ed1c3733871c6d46343365d49ad0c1ec3f7a39 Mon Sep 17 00:00:00 2001 From: Ming Deng Date: Wed, 25 Nov 2020 20:13:23 +0800 Subject: [PATCH] change the globalInstance to read conf/app.conf --- core/config/ini.go | 2 +- server/web/router.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/config/ini.go b/core/config/ini.go index 4d17fb7a..70d00980 100644 --- a/core/config/ini.go +++ b/core/config/ini.go @@ -519,7 +519,7 @@ func (c *IniConfigContainer) Unmarshaler(prefix string, obj interface{}, opt ... func init() { Register("ini", &IniConfig{}) - err := InitGlobalInstance("ini", "config/app.conf") + err := InitGlobalInstance("ini", "conf/app.conf") if err != nil { logs.Warn("init global config instance failed. If you donot use this, just ignore it. ", err) } diff --git a/server/web/router.go b/server/web/router.go index 7bb89d82..d729013b 100644 --- a/server/web/router.go +++ b/server/web/router.go @@ -273,7 +273,6 @@ func (p *ControllerRegister) Include(cList ...ControllerInterface) { for _, f := range a.Filters { p.InsertFilter(f.Pattern, f.Pos, f.Filter, WithReturnOnOutput(f.ReturnOnOutput), WithResetParams(f.ResetParams)) } - p.addWithMethodParams(a.Router, c, a.MethodParams, strings.Join(a.AllowHTTPMethods, ",")+":"+a.Method) } }