improve function Server.Handler for package ghttp

This commit is contained in:
John
2020-04-06 20:29:35 +08:00
parent 2d30a53c3a
commit 2c1e2155e3
2 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,7 @@ We currently accept donation by Alipay/WechatPay, please note your github/gitee
|[侯哥](http://www.macnie.com)|wechat|¥10.00|
|如果🍋|alipay|¥100.00| 错过的奶茶^_^
|蔡蔡|wechat|¥666.00| gf真强大让项目省心
|jack|wechat|¥100.00|
<img src="https://goframe.org/images/donate.png"/>

View File

@ -129,6 +129,9 @@ func ConfigFromMap(m map[string]interface{}) (ServerConfig, error) {
// Handler returns the request handler of the server.
func (s *Server) Handler() http.Handler {
if s.config.Handler == nil {
return s
}
return s.config.Handler
}