Docs / Reference

Contributing

Ghoti is open source under the Apache-2.0 license, and development happens on GitHub. Issues and pull requests are welcome.

Build#

You need the Go version listed in go.mod. Every common task has a make target. Run make help to list them.

$ git clone https://github.com/dankomiocevic/ghoti.git
$ cd ghoti
$ make build        # binary in ./dist/ghoti, override with BUILD_DIR=...
$ make install      # into $(go env GOPATH)/bin

To build without make:

$ go build ./cmd/ghoti
$ ./ghoti run

Test#

CommandWhat it does
make testAll tests with the race detector and coverage. FILTER="TestName" runs matching tests only, and SHORT=1 skips the integration tests.
make test-raceRuns the tests several times under the race detector to observe more interleavings. Override RACE_COUNT, RACE_PACKAGES or FILTER.
make test-benchRuns the Go benchmark tests.
make lintRuns golangci-lint with the repository's .golangci.yaml.

Load tests and benchmark tooling live in a separate repository, ghoti-bench. Its results are on the Benchmarks page.

Continuous integration#

Every pull request runs the Pull Request workflow: golangci-lint, then make test with coverage uploaded to Codecov. The Release workflow runs the same checks on the tagged commit.

Releases#

Releases are built by GoReleaser in the Release workflow when a v* tag is pushed. The body of each release comes from its section in CHANGELOG.md, so that section has to exist before the tag is pushed. To check the setup locally without publishing anything:

$ make release-check                 # validate .goreleaser.yaml
$ make release-snapshot              # build every artefact into dist/
$ make release-notes VERSION=v0.3.0  # print the changelog section for a version

Documentation and this website#

This site is plain HTML and CSS in the ghoti-docsy repository, with no build step. Each page is an index.html in the directory that matches its URL. Pushing to that repository's main branch publishes it to GitHub Pages.

When a change affects behaviour, update the matching page too. The error codes are the exception: change internal/errs/README.md in this repository, which the server embeds as its source of truth, and copy the change into Error codes.

Security issues#

Don't open a public issue for a vulnerability. Follow the reporting process in SECURITY.md.

Found something out of date? Open an issue or edit this page.