Skip to content
Anton edited this page Jan 23, 2018 · 4 revisions

Contributions to fabio of any kind are welcome including documentation, examples, feature requests, bug reports, discussions, helping with issues, etc.

If you have a question on how or what to contribute just open an issue and indicate that it is a question.

Code Contribution Guideline

Your contribution is welcome. To make merging code as seamless as possible we ask for the following:

  • For small changes and bug fixes go ahead, fork the project, make your changes and send a pull request.
  • Larger changes should start with a proposal in an issue. This should ensure that the requested change is in line with the project and similar work is not already underway.
  • Only add libraries if they provide significant value. Consider copying the code (attribution) or writing it yourself.
  • Manage dependencies in the vendor path via govendor as separate commits per library. Please make sure your commit message has the following format:
Vendoring in version <git hash> of <pkgname>

Once you are ready to send in a pull request, be sure to:

  • Sign the CLA
  • Provide test cases for the critical code which test correctness. If your code is in a performance critical path make sure you have performed some real world measurements to ensure that performance is not degregated.
  • go fmt and make test your code
  • Squash your change into a single commit with the exception of additional libraries.
  • Write a good commit message.

Developing

For newcomers to Go, you can't just git clone your forked repo and work from there, due to how Go's GOPATH works. Follow the following steps to easily get started.

  1. Fork this repository to your own account (named "myfork" below)
  2. Make sure you have consul and vault installed in your $PATH
  3. go get github.com/fabiolb/fabio, change to the directory where the code was cloned ($GOPATH/src/github.com/fabiolb/fabio) and add your fork as remote: git remote add myfork git@github.com:myfork/fabio.git
  4. Hack away!
  5. go fmt and make test your code
  6. Commit your changes and push to your own fork: git push myfork
  7. Create a pull-request