DEV Community

Discussion on: Create a Restful API with Golang from scratch

 
pacheco profile image
Thiago Pacheco

Hey Matej, I am glad you could figure it out!
About the router, you can definitely setup differently, the Register func is just a suggestion. The idea about having this Register func is to have an unique way to initialize each of your modules.

Thread Thread
 
pacheco profile image
Thiago Pacheco

Definitely, it is a good practice to write tests.
I didn't include here because the article would get too long, but I could definitely create a part 2 of this article talking about tests, if that would be interesting.