Skip to content

Rework TSR priority - #72

Merged
tigerwill90 merged 8 commits into
feat/method-less-treefrom
feat/change-tsr-priority
Jan 3, 2026
Merged

tigerwill90 merged 8 commits into
feat/method-less-treefrom
feat/change-tsr-priority

Conversation

@tigerwill90

Copy link
Copy Markdown
Collaborator

No description provided.

@codecov

codecov Bot commented Jan 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.52381% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.25%. Comparing base (32dbcf6) to head (3530f62).
⚠️ Report is 1 commits behind head on feat/method-less-tree.

Files with missing lines Patch % Lines
txn.go 0.00% 6 Missing ⚠️
error.go 0.00% 5 Missing ⚠️
tree.go 50.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tigerwill90
tigerwill90 merged commit fca26a3 into feat/method-less-tree Jan 3, 2026
5 of 6 checks passed
@tigerwill90
tigerwill90 deleted the feat/change-tsr-priority branch January 3, 2026 15:06
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant