mirror of https://github.com/status-im/op-geth.git
Coding style
This commit is contained in:
parent
9571a51286
commit
d6f7372a3c
25
README.md
25
README.md
|
@ -25,4 +25,27 @@ Command line options
|
|||
Contribution
|
||||
============
|
||||
|
||||
See CONTRIB.md
|
||||
If you'd like to contribute to Ethereum Go please fork, fix, commit and
|
||||
send a pull request. Commits who do not comply with the coding standards
|
||||
are ignored.
|
||||
|
||||
Coding standards
|
||||
================
|
||||
|
||||
Sources should be formatted according to the [Go Formatting
|
||||
Style](http://golang.org/doc/effective_go.html#formatting).
|
||||
|
||||
Unless structs fields are supposed to be directly accesible, provide
|
||||
Getters and hide the fields through Go's exporting facility.
|
||||
|
||||
Don't "overcomment", meaning that your and my mom doesn't have to read
|
||||
the source code.
|
||||
|
||||
*wrong*
|
||||
|
||||
```go
|
||||
// Check if the value at x is greater than y
|
||||
if x > y {
|
||||
// It's greater!
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue