Learning go - writing routing for http server - can I ask for CR?

Hi all,
I started learning go. Since I’m quite lazy I usually do that by making something useful. So it can keep me interested. That because unless I have to, I do not use tec I’m not familiar with on production.

So I started doing this router, you can find it here:

Is there a way for someone experience to do a little code review? Look for bigger and smaller mistakes (I’m sure there is plenty), bad practices, give me some suggestions etc. Sorry for bad English in README.md. Not my language, i will try to fix that later. But it should be understandable and provide small hint of what to expect.

I want to avoid doing major mistakes when I start writing something bigger, more complex. And I have no one with experience in GO to ask for this :slight_smile:

Thanks in advance :slight_smile:

At first sight seems more close to gorilla/mux. On the other hand i observed you implemented route remove and this is not really a good idea (see here some comments).

Well I was hoping more about the code, not the functionality. This router is not tied to HTTP server, any kind of handlers or anything like that.
Also it does look like mux in some way but I prefer to use arrays and maps because it’s much easier to integrate it this way with your own system. At least mux documentation suggest to use multiple parameters and method chains.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.