Repository navigation
Rework TSR priority - #72
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/method-less-tree #72 +/- ##
=========================================================
+ Coverage 89.01% 89.25% +0.23%
=========================================================
Files 26 26
Lines 4043 3973 -70
=========================================================
- Hits 3599 3546 -53
+ Misses 349 336 -13
+ Partials 95 91 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tigerwill90
added a commit
that referenced
this pull request
Jan 6, 2026
* feat!: use method-less tree with route-level method matching * docs: add godoc comment to Route.Methods method * style: remove empty lines and fix whitespace in error message * feat(options)!: remove deprecated WithAnnotationFunc option * refactor: simplify delRoute by passing index instead of searching for route * fix: make catch-all empty conflict detection method-aware * refactor!: rename ErrRouteExist to ErrRouteConflict and make conflict detection matcher-aware * refactor: use fmt.Stringer interface for matcher string representation * refactor: extract findInsertPosition and simplify route ordering logic * docs: update readme for method-less routes, sub-routers and api changes * docs: fix wording and remove outdated license attribution * docs: improve readme wording for matcher priority and hostname matching * docs: add missing language specifiers to code blocks in readme * docs: add method-less tree feature to roadmap * fix: simplify CORS preflight handling by always responding without being route aware * refactor: replace ConflictType enum with IsShadowed boolean * Rework TSR priority (#72) * feat!: change tsr priority to be equivalent to exact match * fix: exclude wildcard nodes from trailing slash matching * fix: exclude wildcard nodes from trailing slash matching * fix: skip tsr matching for routes with strict slash handling * fix: prioritize exact suffix catch-all over infix wildcard tsr match * fix: use offset instead of charsMatched for wildcard tsr path matching * refactor: remove dead code for trailing slash conflict detection * refactor: simplify route conflict error by replacing kind enum with boolean flag * perf: optimize route matching with fast path and prefix comparison * refactor: cache wildcards length check to avoid redundant slice access * refactor(api)!: rename router factory and route registration methods * docs: add missing documentation for MustAddRoute, MustSubRouter, and NewSubRouter * docs: update readme examples with renamed API methods * docs: improve options and cors documentation with preflight handling and sub-router example * docs: remove outdated custom handler reference from readme * docs: extract hello handler into named function in readme example * docs(readme): add language identifier to code block * docs(readme): clarify sub-router use cases and format hostname wildcard example * docs(readme): fix typo in code block language identifier * docs(readme): add cors middleware to route handlers in examples * docs(readme): remove unused fmt import * refactor(options)!: rename DevelopmentOptions to WithPrettyLogs * fix(router): include router prefix in sub-router pattern * refactor(router): simplify route prefix handling and move hostname validation to parseRoute * test: add path parameter to WrapM test route * test(stringutil): add HasPrefixAndLen tests and use testify assertions * perf(router): use direct string comparison for static node matching * test(benchmark): add benchmark for long pattern * refactor(route): rename hostSplit to hostEnd and replace prefix with prefixEnd * refactor(router): rename Fox method to Router and replace sub with owner field * test(router): remove unused test helper and temporary test code * refactor(router): rename initDefault to initRouter and add recursive call guard to HandleNoRoute * refactor(route): swap wildcard syntax to use `+` for catch-all and `*` for optional * refactor(router)!: replace NewSubRouter with SubRouter method * refactor(router)!: rename SubRouter to Mount and remove route owner field * style(iter): remove outdated TODO comments * docs(readme): rewrite sub-routers section for clarity * docs(route): clarify HandleMiddleware usage and prevent handler misuse * refactor(route): rename Priority to MatchersPriority * docs(context): clarify lifecycle, thread-safety and close requirements * refactor(context): manage route pattern internally instead of using request.Pattern * refactor(router): remove redundant variable and cleanup test code * docs(fox): clarify comment on deferred pool.Put in Mount * fix(context): copy pattern and subPatterns in Clone and CloneWith methods * refactor(context): rename wrapper types to match their factory functions
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.
No description provided.