Skip to content

How to Contribute

Step by step instructions

An open source project becomes meaningful when people collaborate to improve the code.

Feel free to look at the code, critique and make suggestions. Lets make tfswitch better!

Required version

go version 1.13

Step 1 - Create workspace

Skip this step if you already have a github go workspace
Create a github workspace. drawing

Step 2 - Set GOPATH

Skip this step if you already have a github go workspace
Export your GOPATH environment variable in your go directory.

export GOPATH=`pwd`

drawing

Step 3 - Clone repository

Git clone this repository.

git clone git@github.com:warrensbox/terraform-switcher.git

drawing

Step 4 - Get dependencies

Go get all the dependencies.

go mod download
go get -v -t -d ./...

Test the code (optional).

go vet -tests=false ./...
go test -v ./...

drawing

Step 5 - Build executable

Create a new branch.

git checkout -b feature/put-your-branch-name-here

Refactor and add new features to the code.
Go build the code.

go build -o test-tfswitch

Test the code and create a new pull request!

drawing