refactor(app): migrate server lifecycle to Echo v5
- Add http.Server field to App struct for explicit server management - Add StartServer() method to create and start HTTP server - Replace echo.Close() with http.Server.Shutdown() in Shutdown() - Update import from echo/v4 to echo/v5 Changes: - New() initializes server field as nil - StartServer() creates http.Server with Echo as handler - Shutdown() uses http.Server.Shutdown() with context timeout - Removed deprecated echo.Close() call (v5 API change) This provides better control over server lifecycle and graceful shutdown.
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v5"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user