mirror of
https://github.com/donl/gPanel.git
synced 2026-06-30 06:12:06 -06:00
updated contributing for better contributing instructions and issue_template style
This commit is contained in:
parent
c64d7b6b2c
commit
5a26bc372b
2 changed files with 51 additions and 5 deletions
|
|
@ -1 +1,41 @@
|
|||
# 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
|
||||
|
||||
```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.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
Severity level (1-10):
|
||||
### Severity level (1-10):
|
||||
|
||||
Files/Directories Involved:
|
||||
|
||||
Description:
|
||||
|
||||
Personal Comments:
|
||||
### Files/Directories Involved:
|
||||
|
||||
|
||||
|
||||
### Description:
|
||||
|
||||
|
||||
|
||||
### Personal Comments:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue