When contributing to this repository, please first discuss the change you wish to make via issue with the owners of this repository before making a change.
If you are interested in creating third party non-project logic functionality, first consider creating a plugin.
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
- Fork the repo and create your branch from
master
. - If you've added code that should be tested, add tests.
- If you've added code that need documentation, update the documentation.
- Make sure your code follows the effective go guidelines as much as possible.
- Be sure to test your modifications.
- Follow this commit style standard when create a commit, this helps automate versioning and changelog and keeps the repo readable.
- Write a good commit message.
- Issue that pull request!
Please note by participating in this project, you agree to abide by the code of conduct.
We use a vendor directory to store all dependent files. A vendor directory ensures a single source of truth, so that it's clear in each PR what changes are being made, as well as allowing quick testing-out of ideas across various dependent package, or searching the files in your dependent packages via your editor.
BUT this currently comes at a cost. I have begrudgingly migrated from dep to go modules, and go modules are still working on their support for vendor directories: golang/go#27227 golang/go#30240
This means there is a little overhead in working with the code base. If you need to make changes to dependent packages, you have two approaches you can take:
a) Set export GOFLAGS=-mod=vendor
in your ~/.bashrc file
b) use go run main.go
to run cnix
c) if you need to bump a dependency e.g. rubeniskov/cnix-ctrl, use
GOFLAGS= go get -u github.com/rubeniskov/cnix-ctrl@master
go mod vendor
a) don't worry about your ~/.bashrc file
b) use go run -mod=vendor main.go
to run cnix
c) if you need to bump a dependency e.g. rubeniskov/cnix-ctrl, use
go get -u github.com/rubeniskov/cnix-ctrl@master
go mod vendor
Hopefully this will be much more streamlined in the future :)
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using Github's issues
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!