migration
Moving to Plumego. From Gin, Echo, or Chi.
Each migration has a different cost and pattern. Chi is the lowest-friction path; Gin and Echo require handler rewrites. Pick your source framework to see what changes and what stays the same.
func(c *gin.Context) → func(w, r)
All handlers rewritten from gin.Context. Route syntax stays the same.
Middleware must be adapted from gin.HandlerFunc to func(http.Handler) http.Handler.
/foo/:id maps cleanly. Groups stay the same structure.
- no custom context type
- stdlib middleware works without adapters
- zero transitive deps in kernel
func(c echo.Context) error → func(w, r)
All handlers rewritten from echo.Context. Error return idiom replaced with contract.WriteError.
Echo middleware must be adapted. Logger, CORS, and recover all have Plumego equivalents.
Route syntax is similar. Echo group API maps directly to router.Group.
- no custom context type
- explicit error model
- zero transitive deps in kernel
Same handler signature — minimal changes
Chi uses func(w, r) — same as Plumego. Handler code needs no changes.
Chi middleware is func(http.Handler) http.Handler — compatible. Existing middleware often works as-is.
Route syntax is similar. chi.URLParam(r, "id") replaced by router.PathParam(r, "id").
- handler code unchanged
- existing stdlib middleware reused
- lower learning curve
Not ready to migrate everything at once?
Read the Adoption Path guide for a phased approach — stable roots first, extensions only when needed, no big-bang rewrites.