An example project that uses golang gin as webserver, and go-pg library for connecting with a PostgreSQL database.
# postgresql config cp .env.sample .env source .env# get dependencies and run go get -v ./... go run .go test -coverprofile c.out ./... go tool cover -html=c.out # or simply ./test.shgo test -v -run Integration ./... ./test.sh -igo test -v -short ./... # without coverage ./test.sh -s # with coverage ./test.sh -s -c# create a new database based on config values in .env go run . create_db # create our database schema go run . create_schema # create our superadmin user, which is used to administer our API server go run . create_superadmin # schema migration and subcommands are available in the migrate subcommand # go run . migrate [command]