To format all the source texts of the project in accordance with the Go standard, you can use the command:
go fmt ./...
The following linters are used in the project:
- go vet
- errcheck
command install linter:go install github.com/kisielk/errcheck@latest
. - staticcheck
command install linter:go install honnef.co/go/tools/cmd/staticcheck@latest
. - usestdlibvars
command install linter:go install github.com/sashamelentyev/usestdlibvars@latest
All linters of the project can be run with the command:
make lint
To unit-tests, you need to run the command in the root of the project:
make test
Go version 1.22.0 or higher is required for the build.
To build, you need to run the command in the root of the project:
make build
After completing the command, the binary file github.com/dv-net/dv-merchant
will appear in the
.bin
folder.
Start project for developer
cd .docker/dev
docker-compose up -d --no-deps --build github.com/dv-net/dv-merchant
Or using make run
.
To generate SQL wrappers you need to install pgxgen
:
go install github.com/tkcrm/pgxgen/cmd/pgxgen@latest
github.com/dv-net/dv-merchant start
github.com/dv-net/dv-merchant version
github.com/dv-net/dv-merchant migrate up/down
github.com/dv-net/dv-merchant seed up/down
github.com/dv-net/dv-merchant config
github.com/dv-net/dv-merchant permission
github.com/dv-net/dv-merchant transactions
github.com/dv-net/dv-merchant users