From 33fbedffb844ad919c3e1d4c9b76399f06ff8958 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 16 Sep 2019 15:49:31 +0800 Subject: [PATCH] gix issue in Config variable for ghttp.Response.View --- net/ghttp/ghttp_response_view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ghttp/ghttp_response_view.go b/net/ghttp/ghttp_response_view.go index 149317d06..9adc0af9e 100644 --- a/net/ghttp/ghttp_response_view.go +++ b/net/ghttp/ghttp_response_view.go @@ -65,7 +65,7 @@ func (r *Response) buildInVars(params ...map[string]interface{}) map[string]inte } // 当配置文件不存在时就不赋值该模板变量,不然会报错 if c := gins.Config(); c.FilePath() != "" { - vars["Config"] = c.GetMap("") + vars["Config"] = c.GetMap(".") } vars["Cookie"] = r.request.Cookie.Map() vars["Session"] = r.request.Session.Map()