On Mon, Dec 18, 2017 at 5:50 AM, 'Kean Ho Chew' via golang-nuts <
golang-nuts@googlegroups.com> wrote:

> IMO, this article itself is indeed indicating there is an important
> feature not fulfilled by the standard package. It is asking people to write
> their own routers indirectly
>

I disagree. I am making the argument that the concept of a router is
inherently broken. Writing your own router doesn't improve on that. Don't
write a router, write routing logic.

Or, if you prefer: Instead of writing a domain specific language (in the
form of a single router type) for routing which is general enough to cover
any and all usecases, just use the existing language to express the logic.
As the graph of routes is the same and needs to be written down either way,
you end up with effectively the same amount of code, but it is more
readable, more understandable, more localized and overall clearer. IMHO.

p/s: I'm a new comer (transition from C and Python) to Go but due to the
> fact that I need just a simple dynamic parameter url feature
>

The post specifically mentions how to do this.

You don't *have* to heed my advice, of course. Feel free to use gorilla/mux
or any other router, if you prefer. I just wanted to give the people who
*want* to know how to get by with the stdlib the tools necessary to do so :)


that the standard package couldn't offer, it led me into researching about
> this "router" markets which is kind of disappointing from both personal and
> commercial projects perspectives. (So much time wasted studying these
> router studies.)
>
> Kean
>
>
> On Monday, June 19, 2017 at 6:02:37 AM UTC+8, Axel Wagner wrote:
>>
>> Hey gophers,
>>
>> in an attempt to rein in the HTTP router epidemic, I tried writing down
>> a) why I think *any* router/muxer might not be a good thing to use (much
>> less write) and b) what I consider good, practical advice on how to route
>> requests instead. It's not rocket science or especially novel, but I wanted
>> to provide more useful advice than just saying "just use net/http" and
>> haven't seen that a lot previously.
>>
>> Feedback is welcome :)
>> http://blog.merovius.de/2017/06/18/how-not-to-use-an-http-router.html
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to