r/golang • u/dumindunuwan • Oct 06 '19
Building a Dockerized RESTful API application using Go - microservices
https://medium.com/learning-cloud-native-go/lets-get-it-started-dc4634ef03b7
u/OursIsTheFury Oct 07 '19
Good stuff, however one remark: for newbies like me it's interesting to get more information on why you make certain choices. For example: you start with creating a go module, but never explain why. Why a module and not just a regular project?
Maybe this is explained later on, but just a thought I had reading the first half.
1
u/dumindunuwan Oct 13 '19
Thanks for highlighting this. I updated both medium post and https://learning-cloud-native-go.github.io/ project. Feel free to inform the places you got confused(even reddit chat is ok). So, I can avoid those confusions from the new readers.
-1
u/aspirTroll Oct 07 '19
Module is the new way to create modules in go which keep record on other dependency modules versions
0
u/dumindunuwan Oct 07 '19
Hi, In Go, a module is a collection of related Go packages that are versioned together as a single unit. Most often, a version control repository contains exactly one module defined in the repository root. Multiple modules are supported in a single repository, but typically that would result in more work on an on-going basis than a single module per repository.
You can find more info in https://github.com/golang/go/wiki/Modules
4
1
u/CountingCats Oct 07 '19
I love how this tutorial includes prompts to go read relevant the documentation as new elements are introduced :)
2
1
u/dazzford Oct 07 '19
You conflate powerful with convenient. The std lib router is more than powerful enough. But you may have to write the url parsing yourself.
But for most microservices, this should be trivial, and would be a good thing to know how to do before taking on the dependency of an external lib.
I have taken dozens of services to production with “just” the std router
23
u/dumindunuwan Oct 06 '19
Hi,
This is the very beginning of this series. As the first step, we are going to discuss about “How to build a Dockerized RESTful API application using Go”.
In this post, we are discussing,
The completed project can be found in learning-cloud-native-go/myapp GitHub repository. And I’ll upload the same content to learning-cloud-native-go.github.io which uses Docusaurus in the upcoming days. Hope it will be more structured and easy to see the big picture.
Also, I am not a native English speaker. So, if you found any mistake or something I need to be changed, even a spelling or a grammar mistake, please let me know.
⭐ Contribute! 🥤 Buy me a coffee! 🚀 Hire me!
Thanks