1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-25 21:38:56 +02:00

Refactoring

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-03-08 11:18:24 -08:00
parent 6ed0b57228
commit 79f7be2e21
2 changed files with 6 additions and 5 deletions
engine
fasthttp
standard

@ -15,8 +15,8 @@ type (
Server struct {
config *engine.Config
handler engine.Handler
pool *Pool
logger *log.Logger
pool *Pool
}
Pool struct {

@ -14,8 +14,8 @@ type (
server *http.Server
config *engine.Config
handler engine.Handler
pool *Pool
logger *log.Logger
pool *Pool
}
Pool struct {
@ -42,7 +42,10 @@ func NewWithTLS(addr, certfile, keyfile string) *Server {
func NewWithConfig(c *engine.Config) (s *Server) {
s = &Server{
server: new(http.Server),
server: &http.Server{
Addr: c.Address,
Handler: s,
},
config: c,
pool: &Pool{
request: sync.Pool{
@ -83,8 +86,6 @@ func (s *Server) SetLogger(l *log.Logger) {
}
func (s *Server) Start() {
s.server.Addr = s.config.Address
s.server.Handler = s
certfile := s.config.TLSCertfile
keyfile := s.config.TLSKeyfile
if certfile != "" && keyfile != "" {