TIX-REST-PROJECT

example rest project

Requirements

all binary of migration, swaggo and mockgen must be on your $PATH

How To

  • generate a migration
migrate create -ext sql -dir migrations create_posts_table
  • run migrations
migrate -source "file://migrations" -database "mysql://root@tcp(127.0.0.1:3306)/tix_rest_project" up
  • generate swagger files
swag init -g cmd/service/main.go .