-
Avoid nesting by handling errors first. Less nesting means less cognitive load on the reader.
-
Avoid repitition when possible. Deploy one-off utility types for simpler code.
-
Use switch to handle special cases.
-
Writing everything or nothing.
-
Shorter is better or at least longer is not always better.
-
Package with multiple files.
- Avoid very long files.
- Separate code and tests.
- Separated package documentation.
-
Ask for what you need, don't ask extra.
-
Testing using an interface instead of a concrete type makes testing easier.
-
Notifications
You must be signed in to change notification settings - Fork 0
yogeshagr/golang
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Golang
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published