Skip to content
This repository was archived by the owner on Sep 16, 2026. It is now read-only.

Releases

Make LookupResult.Params public

Choose a tag to compare

@dimfeld dimfeld released this 26 Oct 23:50
c997a2a

Thanks @devillexio for the PR!

Add CaseInsensitive routing option

Choose a tag to compare

@dimfeld dimfeld released this 07 Oct 01:07
ce8677c

Thanks to @Russman12 for the PR!

Add RouteData to Request Context before other middleware run

Choose a tag to compare

@dimfeld dimfeld released this 30 Mar 06:30
b61bfc4

This allows middleware to do things like look at parameters and see the matched pattern. Thanks to @ninthclowd for the PR!

Add AddRouteToContext method

Choose a tag to compare

@dimfeld dimfeld released this 24 Apr 02:41
ebfe087

Just adding a helper function to assist in writing handler tests.

Add ContextRoute method. Efficiency fix on Context data

Choose a tag to compare

@dimfeld dimfeld released this 17 Apr 19:08
4a4229d

The internal contextData type now uses a pointer receiver to avoid copying it on every access. Also added a ContextRoute helper method to directly extract the Route string if that's all you need. Thanks again to @stuartclan for the help!

Place the unexpanded route path in the request Context

Choose a tag to compare

@dimfeld dimfeld released this 16 Apr 18:57
e7c8e18

This is mostly to allow logging middleware to show the actual route matched without expanded wildcards.

Request context data can now be accessed using httptreemux.ContextData(r.Context()), which returns an interface ContextRouteData containing the parameters and the route path. The old ContextParams method is no longer recommended, but will continue to exist and work as before.

Thanks to @stuartclan for the suggestion and help with the implementation and review!

Add Middleware Support

Choose a tag to compare

@dimfeld dimfeld released this 11 Apr 08:34

Middleware is now officially supported. Documentation coming soon. Many thanks to @vmihailenco for the PR and @kravemir for help with the review!

Add Go Module Support

Choose a tag to compare

@dimfeld dimfeld released this 18 Dec 18:14

No code changes. This release just adds support for Go Modules. Thanks @SamWhited for the PR!

Fix doubly-escaped characters when redirecting

Choose a tag to compare

@dimfeld dimfeld released this 13 Feb 07:49
7f53248

When redirecting from a URL like /The%20Path/, the URL was incorrectly escaped again, redirecting to /The%2520Path.

Thanks to @Backfighter for the detailed bug report!

Use PathUnescape on Go 1.8+

Choose a tag to compare

@dimfeld dimfeld released this 11 Oct 20:17

Go 1.7 and below continues to use UrlUnescape. I bumped the major version since this is a breaking change, but I doubt anyone will complain.

⌂ 换网址