Naistrix is an opinionated wrapper around the Cobra library, used when building CLI applications in Go.
Use go get to fetch the latest version of Naistrix:
go get github.com/nais/naistrix@latestPlease have a look at the examples directory for usage examples.
git clone git@github.com:nais/naistrix.git
cd naistrixNaistrix uses mise to handle dependencies and tasks. After installing mise run the following command to install tools:
mise installFirst, create a new branch for your changes:
git checkout -b my-feature-branchMake the necessary changes to the codebase. When committing your changes, make sure to follow the conventional commit specification. This helps maintain a clean and understandable project history along with a nice automated Changelog.
The repository contains a commit-msg git hook that might be helpful. To enable this you can do the following from the project root:
ln -s ../../script/semantic-commit-hook.sh .git/hooks/commit-msgThere are also several mise tasks that you can use to validate your changes. See all available tasks by running:
mise runOnce you have made your changes and committed them, push your branch and make a pull request against the main branch.
MIT, see LICENSE.txt for details.