What is inside?
-
How to declare a Go function?
- Parameters
- Signature
- Body
- Return keyword
- Block
-
Func Parameters and Result Types Examples
- Niladic Funcs
- Singular Funcs
- Multiple input params and result types
- Example with an error value
- Discarding the result values
- Named result param and the naked return
- The shadowing problem
- Pass-by-value
- Pass-by-value and the pointers
-
Naming Funcs
- Be a Minimalist
- Name in MixedCaps
- Descriptive param names
- Use verbs
- Use is / are
- Omit types in the name
- Getters and Setters
- Some things Go funcs donât support
â Click here to read the guide.
See you next Friday!
Top comments (0)