- Download go archive:
wget https://dl.google.com/go/go1.22.0.linux-amd64.tar.gz - Extract binaries:
sudo tar -C /usr/local/ -xzf go1.22.0.linux-amd64.tar.gz - Set go binaries to $PATH(environment variables):
export PATH=$PATH:/usr/local/go/binsudo nano $HOME/.profilesource .profile - Install Taskfile to run tasks:
go install github.com/go-task/task/v3/cmd/task@latest
- Install goose if not installed:
go install github.com/pressly/goose/v3/cmd/goose@latest - Check status of migrations:
task db/migrations/status - Check version of migrations:
task db/migrations/version - Validate migrations:
task db/migrations/validate - Run migrations up:
task db/migrate/up
- Install swagger if not installed:
go install github.com/swaggo/swag/cmd/swag@latest - Generate swagger docs:
swag init -dir ./cmd/api/ -o ./api/docs