-
Notifications
You must be signed in to change notification settings - Fork 14
Development
Tim Pavlik edited this page Jun 22, 2020
·
4 revisions
Quick Start
- Homebrew
brew install golang # and set up your environment
brew install jq
make test_unit
- Clone this repo into any location, since we're using modules it is recommended this actually be outside of your $GOPATH e.g.
git clone https://github.com/splunk/splunk-cloud-sdk-go.git ~/src/splunk-cloud-sdk-go
- Enter the cloned repo with
cd ~/src/splunk-cloud-sdk-go
replacing the path for whatever you cloned to in step 1 - Setup required development using
make setup
- Now you should be able to build with
make build
- The newly-built scloud binary with any changes you have made should now available in
bin/scloud
- Make sure your code is passing linting using
make lint
- Make sure your code is passing go vet using
make vet
Automatically format your code with gofmt and goimports using make format
and commit any formatting changes
We have added the mod=readonly
flag to our go build
commands to prevent automatic updating of go.mod to track new dependencies in order to prevent accidental updates/changes in CI. If you need to add a dependency so that this project and its imports will build correctly please use go get
which will update go.mod
and go.sum
. You should then push the changes made to go.mod
and go.sum
.