🤖 Backend
Go
How to Structure Your Project in Golang

How to Structure Your Project in Golang

Golang has their document to organize the project

https://go.dev/doc/modules/layout (opens in a new tab)

This Is The BEST Way To Structure Your GO Projects - By Melkey

only the basic

https://www.youtube.com/watch?v=dxPakeBsgl4 (opens in a new tab)

cmd/
bin/
internal/
  module-a/
  module-b/
pkg/
tests/
go.mod
Readme.md

Clean architecture in Go. How to organize a project structure? By Ruslan Tysganok

With extending previous implementation

https://www.youtube.com/watch?v=goC-gCNWhS4 (opens in a new tab) https://github.com/ruslantsyganok/clean_arcitecture_golang_example (opens in a new tab)

cmd/
bin/
internal/
  module-a/
    app/ (handler, controller)
    datastruct/
    dto/
    service/
    repository/ (database or place where another microservice )
pkg/
go.mod
Readme.md

Go Coffeeshop Github

https://github.com/thangchung/go-coffeeshop (opens in a new tab)

cmd/
bin/
internal/
  module-a/
    app/ (handler, controller)
    domain/
    infras/
    service
pkg/
go.mod
Readme.md