Skip to content

Jumaniyozov/go-rest-template

Repository files navigation

Initial settings

  1. Download go archive: wget https://dl.google.com/go/go1.22.0.linux-amd64.tar.gz
  2. Extract binaries: sudo tar -C /usr/local/ -xzf go1.22.0.linux-amd64.tar.gz
  3. Set go binaries to $PATH(environment variables):

    export PATH=$PATH:/usr/local/go/bin

    sudo nano $HOME/.profile

    source .profile

  4. Install Taskfile to run tasks: go install github.com/go-task/task/v3/cmd/task@latest

Migrations settings

  1. Install goose if not installed: go install github.com/pressly/goose/v3/cmd/goose@latest
  2. Check status of migrations: task db/migrations/status
  3. Check version of migrations: task db/migrations/version
  4. Validate migrations: task db/migrations/validate
  5. Run migrations up: task db/migrate/up

Swagger settings

  1. Install swagger if not installed: go install github.com/swaggo/swag/cmd/swag@latest
  2. Generate swagger docs: swag init -dir ./cmd/api/ -o ./api/docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages