First please read our code of conduct to proceed.
Setup | Linting/Testing | Writing Tests | Internals
We use go modules, so requirements for this project is go version >= 1.11.0
.
And don't forget to enable GO111MODULE
:
$ export GO111MODULE=on
Note: pre-requirements for linting is golang.org/x/lint/golint
, so first install it:
$ go get -u golang.org/x/lint/golint
And then:
$ git clone https://github.com/olehan/kek
$ cd kek
$ make bootstrap
Lint your code by running:
$ make lint
And test it via:
$ make test
To lint and test:
$ make check
Tests are written along with site the file it's testing.
For example, if your package request
has a service.go
in it
tests would be written in service_test.go
and so on.
-
Project Architecture - golang clean architecture | Struct:
domain | model.go | repo.go └── service.go
or
domain | {sub_domain}_model.go | {sub_domain}_repo.go └── {sub_domain}_service.go
-
Commit messages convention - conventional commit messages | Examples:
-
Branch naming convention -
type/title
| Examples:feat/perform-request
,ci/stale-bot
,docs/contributing
,fix/response-typo
-
Tar version names - semver | Examples:
v1.2.3
,v2.3.1-rc.3
,v4.21.2-beta.4
-
Why space indention? - this answer from stackoverflow describes the idea.