-
Notifications
You must be signed in to change notification settings - Fork 989
Open
Description
What would you like to be added:
Good Code Style.
Why is this needed:
- Standardized code promotes teamwork
- Standardized code can reduce bug handling
- Standardized code can reduce maintenance costs
- Standardized code helps code review
How:
Although golang does not have a recognized code specification, we can refer to those:
https://go.dev/ref/spec
https://github.com/golang/go/wiki/CodeReviewComments
https://github.com/uber-go/guide/blob/master/style.md
e.g.
var localIp string
func GetLocalIp() string {
}into
var localIP string
func GetLocalIP() string {
}type Service struct {
name string
rcvr reflect.Value
rcvrType reflect.Type
methods map[string]*MethodType
}into
type Service struct {
name string
rv reflect.Value // receiveValue
rt reflect.Type // receiveType
methods map[string]*MethodType
}Metadata
Metadata
Assignees
Labels
No labels