Remove Echo framework, upgrade to Go 1.24 and PocketBase v0.36.2#877
Closed
Remove Echo framework, upgrade to Go 1.24 and PocketBase v0.36.2#877
Conversation
Co-authored-by: statik <983+statik@users.noreply.github.com>
Co-authored-by: statik <983+statik@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove Echo framework and update project dependencies
Remove Echo framework, upgrade to Go 1.24 and PocketBase v0.36.2
Feb 13, 2026
statik
reviewed
Feb 13, 2026
|
|
||
| log.Debug().Msgf("running pocketbase with data dir %s\n", configDir) | ||
| app := pocketbase.NewWithConfig(&pocketbase.Config{ | ||
| app := pocketbase.NewWithConfig(pocketbase.Config{ |
Member
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
pocketbase.Config is missing fields HideStartBanner, DefaultDev, DefaultEncryptionEnv, DefaultQueryTimeout, DataMaxOpenConns, DataMaxIdleConns, AuxMaxOpenConns, AuxMaxIdleConns, DBConnect (exhaustruct)
| mux.Handle("/api/switcher/", &Switcher{}) | ||
| mux.Handle("/api/light/", &Lighting{}) | ||
|
|
||
| server := &http.Server{ |
Member
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
| if err != nil { | ||
| panic(fmt.Errorf("failed to create sub FS: %w", err)) | ||
| } | ||
| return sub |
Member
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
return with no blank line before (nlreturn)
| }) | ||
|
|
||
| app.OnBeforeServe().Add(func(e *core.ServeEvent) error { | ||
| app.OnServe().BindFunc(func(e *core.ServeEvent) error { |
Member
There was a problem hiding this comment.
🚫 [golangci] reported by reviewdog 🐶
parameter name 'e' is too short for the scope of its usage (varnamelen)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Eliminates Echo v5 dependency in favor of Go stdlib and PocketBase native routing. Upgrades Go 1.22.8→1.24 and PocketBase v0.16.5→v0.36.2 (20 minor versions), handling breaking API changes in PocketBase's routing layer.
Changes
Core Dependencies
github.com/labstack/echo/v5go mod tidyPocketBase Server (
cmd/fly.go)Migrated from Echo-based routing to PocketBase v0.36 native router:
OnBeforeServe()→OnServe()hookecho.Routewith router methods (GET,POST)apis.Static()andapis.WrapStdHandler()for handlersNewWithConfig()signature (value vs pointer)migratecmd.Options→migratecmd.ConfigStandalone HTTP Server (
cmd/lighting.go)Replaced Echo with Go stdlib
http.ServeMux:Filesystem Utilities
embeddy/embedder.go: Replacedecho.MustSubFS()with stdlibfs.Sub()wrappersitemanifest/main.go: Updated codegen template to remove Echo importsMigration Notes
PocketBase v0.36 removes Echo dependency internally. Applications using PocketBase should migrate to the new router API. The
ServeEvent.Routernow uses PocketBase's native router with methods likeGET(),POST(), and middleware functions likeapis.Static().Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.