lorem ip sum ........
make run
- If you are unable to use the
wirecommand, you need to add$GOPATH/binto your$PATH# Fish shell example fish_add_path $(go env GOPATH)/bin
Fix wire.go in di Package Warning
-
Create a
.vscodedirectory at the root of the project. -
Create a
settings.jsonfile in the .vscode directory. -
Add the following JSON to
settings.json{ "gopls": { "buildFlags": ["-tags=wireinject"] }, "editor.tabSize": 4 }
Config launch.json for debugging (optional)
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/rest",
"cwd": "${workspaceFolder}"
},
]- Add variable to
config/env/.env - Add variable to
internal/app/config/config.go
-
Add all injection function in feature that you develop. to
/di/wire.go(Only that are not already in the set) -
Use
wirefor Dependency Injectionwire ./...
-
When you fixed gorm model
atlas migrate diff --env dev
-
When you want to migrate
atlas migrate apply --env dev
Create uuid-ossp extension if not exists in your postgres
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";make swag-init