Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Latest commit

 

History

History
55 lines (34 loc) · 1.64 KB

CONTRIBUTING.md

File metadata and controls

55 lines (34 loc) · 1.64 KB

Contributing to knit

Table of Contents

Requirements

  • Go (check pinned version in go.mod)
  • Mage

How to install Mage:

go install github.com/magefile/mage

Commit style

This project uses Conventional Commits. This is automatically enforced by our tool Commitsar. Please make sure your commits follow this standard and are descriptive.

API Service

The API is created using oto. Please check out THIS article to understand how to use it.

All definition files are housed under api/definitions. To generate API endpoint defintions from this please run: make generate_oto.

Troubleshooting

  • Can't find oto binary: please run make install_deps.

Tooling

For 3rd party tools such as oto we use the go tools file approach. For consideration in the future is this project: https://github.com/go-modules-by-example/index/tree/master/017_using_gobin

Essentially boils down to this:

  • add your tool as a dependency to tools.go
  • add the dependency to Install in mage.go and run mage install

Reasons

By using this approach we can version tools used in knit as a normal Go dependency.

Troubleshooting

Can't find mage

Make sure your PATH points to GOBIN:

export PATH=${PATH}:`go env GOPATH`/bin