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:
parent
34e964851f
commit
f730def2c6
@ -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{
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user