template-api

module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2025 License: MIT

README

template-api

Go Report Card GitHub Downloads GitHub Release Test Coverage

template-api is an API REST template project.

# install gonew
go install golang.org/x/tools/cmd/gonew@latest
# use gonew to create your project based on this template
gonew github.com/sgaunet/template-api gitplatform.com/username/awesome_new_project
cd awesome_new_project
git init
git add .
git remote add origin git@gitplatform.com:username/awesome_new_project
git push -u origin master

Run

$ cat cfg.yaml
dbdsn: postgres://user:password@host:port/dbname?sslmode=disable
$ template-api -cfg cfg.yaml
...

Install

  • Download the binary in the release section
  • Or use the docker image

Development

This project is using :

There are hooks executed in the precommit stage. Once the project cloned on your disk, please install pre-commit:

brew install pre-commit

Install tools:

task dev:prereq

And install the hooks:

task dev:install

To launch manually the pre-commmit hook:

task dev:pre-commit

Directories

Path Synopsis
cmd
server command
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL