fix(deps): update module github.com/go-pkgz/routegroup to v1.6.3 #12
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
hmajid2301/lettucego!12
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/github.com-go-pkgz-routegroup-1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
v1.4.1→v1.6.3Release Notes
go-pkgz/routegroup (github.com/go-pkgz/routegroup)
v1.6.3: Version 1.6.3Compare Source
This release makes
HandleRooton a bundle without a base path match the root only.HandleRootandHandleRootFuncon a bundle without a base path, such as the one fromroutegroup.New, registered/, whichhttp.ServeMuxtreats as a catch-all. Every unmatched request for that method reached the root handler, and a customNotFoundHandlernever ran for it. They now register/{$}, the patternHandleFunc("/")already uses. Mounted groups are unchanged. #36 @paskalr.PatternandBundle.Handlerreport/{$}with the registered method prefix, if any, such asGET /{$}, so metrics or logs keyed on the pattern string see the new value.HandleRoot("", h)withHandle("GET /", spa)now causes a conflicting-pattern panic at registration. So does combiningHandleRoot("GET", h)withHandleFunc("GET /", root). To keep the earlier routing, register the catch-all withHandle:HandleRoot("", h)becomesHandle("/", h), andHandleRoot("GET", h)becomesHandle("GET /", h).Wrapexample compiles, theNotFoundHandlerexample has its closing parenthesis, and the real-world example servesGET /static/in place of the literalGET /static/*. New notes cover root middleware scope and path values,Routelocking, andHandleFilespatterns. #36 @paskal,79d9cc8v1.6.2: Version 1.6.2Compare Source
This release fixes method patterns on mounted groups.
Handlewith a method pattern ending in/on a mounted group put the mount prefix in front of the method, soMount("/api").Handle("GET /files/", h)registered/apiGET /files/and panicked. The prefix now goes on the path, and the route registers asGET /api/files/. #33 @bensynapseHandleFileshad the same defect on a mounted group. On a root group the pattern registered, but the method ended up in the prefix passed toStripPrefix, and every file returned 404. #34 @umputungo.mod. #35 @paskalv1.6.1: Version 1.6.1Compare Source
What's Changed
Bug Fixes
http.ServeMuxrouting with a custom not-found handler by @umputun in #32Details
v1.5.3 stopped a custom
NotFoundHandlerfrom overriding 405 responses. It turns outhttp.ServeMuxreports an empty pattern for three outcomes, not two, and the third one was still being swallowed:/a/../xor//x, now gets the standard library's redirect instead of the custom 404. Previously the redirect was replaced, so the 405 or handler waiting at the cleaned path was never reached.POSTroute was enough to trigger it.Bundlemounted under an outer mux asouter.Handle("/app/{rest...}", bundle)now seesr.PathValue("rest")intact inside its custom handler, where it was previously cleared.Implementation
The probe now runs the handler that the route lookup already returned rather than re-entering the mux, so it can only reach one of
ServeMux's own synthetic handlers. The route is resolved again inside the wrapped handler, and a request that matches after a middleware rewrite goes straight to the mux.The extra lookup happens only when no route matched on entry and a
NotFoundHandleris configured. Benchmarked against v1.6.0 with 20 routes registered, a matched request with three root middlewares is unchanged at roughly 290 ns and the same allocation count, both serially and at 16-way parallelism.Improvements
Full Changelog: https://github.com/go-pkgz/routegroup/compare/v1.6.0...v1.6.1
v1.6.0: Version 1.6.0Compare Source
What's Changed
UX Improvement: Auto-Group Creation in Route()
The
Route()method now automatically creates a sub-group when called on the root bundle. This fixes a common UX issue where users would callrouter.Route(...)expecting isolated middleware scope but accidentally modify the root bundle's global middleware stack.Before:
After (v1.6.0):
Breaking Change Note
This is technically a behavior change that may affect code relying on the old pattern of
router.Route()modifying the root bundle directly. However, this old behavior was rarely the intended use case and often led to bugs.The following patterns are now equivalent:
router.Route(fn)router.Group().Route(fn)Existing code using
router.Mount("/path").Route(fn)orrouter.Group().Route(fn)is unaffected.Internal Fix
Fixed root bundle locking to properly maintain the Use-before-routes contract when routes are registered via
Route()auto-wrapping.Full Changelog: https://github.com/go-pkgz/routegroup/compare/v1.5.3...v1.6.0
v1.5.3: Version 1.5.3Compare Source
What's Changed
Bug Fixes
Details
Implementation
Full Changelog: https://github.com/go-pkgz/routegroup/compare/v1.5.2...v1.5.3
v1.5.2: Version 1.5.2Compare Source
Bug Fixes
Improvements
Breaking Changes
Technical Details
This release fixes a critical bug introduced in v1.5.0 where middlewares were executed twice when using the root bundle. The issue has been resolved by restructuring how middlewares are applied - global middlewares now execute only at serve time with proper pattern visibility.
Thanks to @kerbrek for reporting the issue!
v1.5.1: Version 1.5.1Compare Source
Bug Fix
Testing Improvements
What's Changed
Full Changelog: https://github.com/go-pkgz/routegroup/compare/v1.5.0...v1.5.1
v1.5.0Compare Source
What's Changed
Bug Fixes
Architecture Improvements
Use()after registering routes on the same bundle will now panic with a descriptive errorDocumentation
Maintenance
DisableNotFoundHandler()is now a no-op (preserved for backward compatibility)Compatibility
This release maintains full backward compatibility. The only breaking change is intentional - calling
Use()after routes are registered will panic to prevent subtle middleware ordering bugs.Full Changelog: https://github.com/go-pkgz/routegroup/compare/v1.4.1...v1.5.0
Configuration
📅 Schedule: (in timezone Europe/London)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
⚠️ Artifact update problem
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below:
File name: go.mod
9fc66980f8b93b4fad4cView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.