This repository contains the implementations of some commonly used libraries.
Requirements:
- Install go version specified in
go.mod
and.tool-versions
. You can use asdf to manage multiple versions. - Install golangci-lint.
- Install mockgen. If you are using asdf to manage versions, execute
asdf reshim golang
after installing mockgen. - Install wire. If you are using asdf to manage versions, execute
asdf reshim golang
after installing wire. - Install container environment. You can choose either docker or podman.
- Execute the following commands to install git hooks:
- Pre-commit hook will run checks and tests before committing:
ln -s ../../githooks/pre-commit .git/hooks/
- Commit-msg hook will check where commit message conforms to conventional commits:
ln -s ../../githooks/commit-msg .git/hooks/
Test:
cd deployments && cp .env.example .env
and edit.env
, thensource .env
.- Launch containers
cd deployments && docker compose up -d
. - Now you can run tests via
go test
command.