App Structure :
- app -> all logic of application requirement
- controllers -> controller to consume on route
- dto -> data transfer object (request, response)
- middlewares -> middleware of the app
- models -> model of database
- repositories -> repository to encapsulation query or fetch data
- services -> to build logic of the app
- config -> configuration app
- pkg -> package usage in app
- provider -> behavior app needed
- route -> app route (api/web)
Migration Tools : https://github.com/pressly/goose
Get and install tools from github repo
go install github.com/daewu14/golang-base/cmd/diego@v1.2.1
Check your GOPATH location
go env GOPATH
$ <your-location-gopath>
Copy path and make alias installed diego, example on macos with zsh
alias diego = "/<your-location-gopath>/bin/diego"
Use diego
diego -h
Update Diego (beta - available at version >= v1.2.0)
diego update