diff --git a/g/net/ghttp/ghttp_server.go b/g/net/ghttp/ghttp_server.go index 4b8d963cc..d79125abe 100644 --- a/g/net/ghttp/ghttp_server.go +++ b/g/net/ghttp/ghttp_server.go @@ -15,7 +15,6 @@ import ( "gitee.com/johng/gf/g/container/gtype" "gitee.com/johng/gf/g/os/gcache" "gitee.com/johng/gf/g/os/genv" - "gitee.com/johng/gf/g/os/gfile" "gitee.com/johng/gf/g/os/glog" "gitee.com/johng/gf/g/os/gproc" "gitee.com/johng/gf/g/os/gtime" @@ -212,14 +211,6 @@ func (s *Server) Start() error { return errors.New("server is already running") } - // 仅在开启静态文件服务的时候有效 - if s.config.FileServerEnabled { - // (开发环境)添加main源码包到搜索目录 - if p := gfile.MainPkgPath(); p != "" && gfile.Exists(p) { - s.AddSearchPath(p) - } - } - // 底层http server配置 if s.config.Handler == nil { s.config.Handler = http.HandlerFunc(s.defaultHttpHandle)