How to structure a golang project - The best golang project structure ever

preview_player
Показать описание
In this somewhat long video, I explain the best way to structure a golang project. skip t0 4:11 to see the new architecture

** Please do note this is a guideline feel free to break it apart and put it back together to fit your needs. This is just my flavor **

I also skipped over middleware in the server file

and there might be a need for an adaptors package for external packages and functions

I just started learning go in march (2 months ago), coming from JS. I love go and it has reignited my passion for programming again.

Looking for a nice golang job as well.

I'm still pretty new but I hope to share more tips with the go commuinity along my journey.
Рекомендации по теме
Комментарии
Автор

this is a great video! most of the time people will try to learn Go and create a new project but doesn't know how to structure code from a simple project to a project that looks like a real world working scenario, very informative!

ramencombo
Автор

Thank you for providing a great content!

dshyryayev
Автор

That’s quite cool how you were able to make requests right from vscode, learnt something new thanks 🙏🏾

basketeveryday
Автор

This is a beautiful structure, keep up them awesome videos! 👍

zhrk
Автор

I like the preview #StandWithUkraine.
I was looking for a video about structuring a go project three years ago.

andytheodorko
Автор

Why you put all code in pkg? all this time I thought "pkg" is only for shared code. So I put my app code in "internal".

pointrocket
Автор

You should study more about package oriented design. Tô underdtand the meaning of the folders

wblech
Автор

Great video but Henry tried a pathetic attempt to lure people into clicking his video by using a ridiculous video title. You should always rely on your content, not a click bait strategy. Anyways, I enjoyed the video. Thanks!

frankyhonnolus
welcome to shbcf.ru