Пример #1
0
// Run starts the HTTP server.
func (e *Echo) Run(s engine.Server) {
	s.SetHandler(e)
	s.SetLogger(e.logger)
	if e.Debug() {
		e.logger.Debug("running in debug mode")
	}
	e.logger.Error(s.Start())
}
Пример #2
0
// Run starts the HTTP server.
func (e *Echo) Run(s engine.Server) error {
	e.server = s
	s.SetHandler(e)
	s.SetLogger(e.logger)
	if e.Debug() {
		e.SetLogLevel(glog.DEBUG)
		e.logger.Debug("running in debug mode")
	}
	return s.Start()
}
Пример #3
0
// Run starts the HTTP server.
func (e *Echo) Run(s engine.Server) {
	s.SetHandler(e)
	s.SetLogger(e.logger)
	if e.Debug() {
		e.SetLogLevel(glog.DEBUG)
		e.logger.Debug("running in debug mode")
	}
	if err := s.Start(); err != nil {
		panic(fmt.Sprintf("echo: %v", err))
	}
}
Пример #4
0
// Run starts the HTTP server.
func (e *Echo) Run(s engine.Server) {
	s.SetHandler(e)
	s.SetLogger(e.logger)
	e.logger.Error(s.Start())
}