-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation files/linter/formatter
Added instructions to contributing.md on how to format the code Added golint to the project, and ran each file with it Added documentation for the linter Fixed small spelling error Fixed code examples display in doc's Added visual studio file with settings.json and extentsions.json
- Loading branch information
1 parent
3cc99a4
commit 08e02a7
Showing
7 changed files
with
106 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"golang.go", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"go.buildOnSave": "off", | ||
"go.lintOnSave": "package", | ||
"go.vetOnSave": "off", | ||
"go.buildFlags": [], | ||
"go.lintFlags": [], | ||
"go.vetFlags": [], | ||
"go.lintTool": "golint", | ||
"go.coverOnSave": false, | ||
"go.testOnSave" : false, | ||
"go.useCodeSnippetsOnFunctionSuggest": false, | ||
"go.formatTool": "gofmt", | ||
"[go]": { | ||
"editor.formatOnSave": true, | ||
"editor.insertSpaces": true, | ||
"editor.tabSize": 2, | ||
"editor.detectIndentation": false, | ||
"files.eol": "\n", | ||
"files.insertFinalNewline": true, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## Contributing | ||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. | ||
|
||
## Installation | ||
Install GO on your machine and reboot. Then: | ||
|
||
Use the package manager to install LinkStatus.go | ||
```bash | ||
git clone https://github.com/MSTEWARDSON/LinkStatus.git | ||
cd LinkStatus | ||
go build | ||
``` | ||
|
||
## Formatting the code | ||
Before making a pull request, please run gofmt on all files you changed, or on the whole directory itself. | ||
|
||
Single File | ||
```go | ||
gofmt -w file.go | ||
``` | ||
OR | ||
|
||
Directory | ||
```go | ||
go fmt ./ | ||
``` | ||
|
||
## Using the linter | ||
For this project we are using the golint linter. If you do not have it already installed use: | ||
```bash | ||
go get -u golang.org/x/lint/golint | ||
``` | ||
|
||
Single File | ||
```bash | ||
golint file.go | ||
``` | ||
OR | ||
|
||
Directory | ||
```bash | ||
golint ./ | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters