Merge pull request #4 from george-e-shaw-iv/community_files

Community files
This commit is contained in:
George Shaw 2017-10-18 17:44:17 -05:00 committed by GitHub
commit a64524c8e7
2 changed files with 53 additions and 5 deletions

View file

@ -1 +1,43 @@
# Todo
# Contributing to gPanel
Todo general paragraph...
## Stylistic & Conventions Guidelines
We follow all naming and style conventions that are officially put out by the developers of Go themselves. All of these rules and conventions can be found in their [Effective Go](https://golang.org/doc/effective_go.html) tutorial.
As this project is open source we do encourage commenting wherever may be necessary and require comments for all function declarations. The reason this is important is because it will increase productivity to whoever wants to come along and either add to or improve your code later on.
### Examples of Well-documented Code
#### Function Blocks
```go
/*
A function used to add two integers who must be positive
@param one int
The first integer term of the to-be sum, must be positive
@param two int
The second integer term of the to-be sum, must be positive
@return int
The sum of the two input integers
@return error
The resulting error, if there is none it returns as nil
Known Problems: Can't handle negative integers
*/
func addTwoPositiveIntegers(one int, two int) (int, error) {
var answer int;
if one < 0 || two < 0 {
return answer, errors.New("One or both of the input integers are negative")
} else {
answer = one + two
return answer, nil
}
}
```
This is how a typical function block comment should look. A short description of the function, followed by parameter explanations, then return explanations, and finally, if applicable, a "Known Problems" section. The known problems section is important because it is an easy way to set a flag of sorts for other contributors to come and fix what you couldn't figure out or didn't have time to do.

View file

@ -1,7 +1,13 @@
Severity level (1-10):
### Severity level (1-10):
Files/Directories Involved:
Description:
Personal Comments:
### Files/Directories Involved:
### Description:
### Personal Comments: