julienschmidt / httprouter

A high performance HTTP request router that scales well
https://pkg.go.dev/github.com/julienschmidt/httprouter
BSD 3-Clause "New" or "Revised" License
16.57k stars 1.47k forks source link

Consider shipping your Radix tree as a separate package #131

Open flimzy opened 8 years ago

flimzy commented 8 years ago

I'm quite a fan of your httprouter package, and would love to use your Radix tree in other projects, where partial matching (as with your named parameters) is useful, and where the go-radix package falls short.

Would you consider shipping your radix tree as a separate package? Or would you mind if I were to put that functionality into its own module?

(I know the licensing terms allow me to do that, but I still prefer to seek feedback before forking a project, even if it's only a portion.)

kron4eg commented 8 years ago

@flimzy how did the story ended?

julienschmidt commented 7 years ago

Go ahead. There is already a fork of just the CleanPath part.

IMO the tree is not so useful as a universal data structure as it is specifically designed for path prefix matching. What use-cases do you have?

flimzy commented 7 years ago

My use case is a router to run in the browser, for a single-page app (and compiled with GopherJS). so in that case, your path prefix matching is perfect, because it's still using URLs.