Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Install GO on your machine and reboot. Then:
Use the package manager to install LinkStatus OR download the zip from the lastest tag and extract it within your go/src/
If installed via package manager
git clone https://github.com/MSTEWARDSON/LinkStatus.git
cd LinkStatus
go install
If you downloaded, run:
go install LinkStatus
If you are making changes to the code, before you test run:
go build
Before making a pull request, please run gofmt on all files you changed, or on the whole directory itself.
Single File
gofmt -w file.go
OR
Directory
go fmt ./
For this project we are using the golint linter. If you do not have it already installed use:
go get -u golang.org/x/lint/golint
Single File
golint file.go
OR
Directory
golint ./
If you are making a pull request, make sure to run:
go test
This will run your code through some checks to make sure it doesn't break the program. If you want to add your own tests just make a new file with a clear name to show its a test. For example "A_test.go".
To check the code coverage run:
go test [filename] -cover