1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-23 21:29:26 +02:00

Renamed engine constructor

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-03-08 20:30:35 -08:00
parent 34e964851f
commit f730def2c6
2 changed files with 8 additions and 8 deletions

View File

@ -30,19 +30,19 @@ type (
func New(addr string) *Server {
c := &engine.Config{Address: addr}
return NewWithConfig(c)
return NewFromConfig(c)
}
func NewWithTLS(addr, certfile, keyfile string) *Server {
func NewFromTLS(addr, certfile, keyfile string) *Server {
c := &engine.Config{
Address: addr,
TLSCertfile: certfile,
TLSKeyfile: keyfile,
}
return NewWithConfig(c)
return NewFromConfig(c)
}
func NewWithConfig(c *engine.Config) (s *Server) {
func NewFromConfig(c *engine.Config) (s *Server) {
s = &Server{
config: c,
pool: &Pool{

View File

@ -28,19 +28,19 @@ type (
func New(addr string) *Server {
c := &engine.Config{Address: addr}
return NewWithConfig(c)
return NewFromConfig(c)
}
func NewWithTLS(addr, certfile, keyfile string) *Server {
func NewFromTLS(addr, certfile, keyfile string) *Server {
c := &engine.Config{
Address: addr,
TLSCertfile: certfile,
TLSKeyfile: keyfile,
}
return NewWithConfig(c)
return NewFromConfig(c)
}
func NewWithConfig(c *engine.Config) (s *Server) {
func NewFromConfig(c *engine.Config) (s *Server) {
s = &Server{
server: new(http.Server),
config: c,