pherzheyu opened a new issue #1755:
URL: https://github.com/apache/dubbo-go/issues/1755


   <!-- Please only use this template for submitting enhancement requests -->
   
   **What would you like to be added**:
   
   Good Code Style.
   
   **Why is this needed**:
   1. Standardized code promotes teamwork
   2. Standardized code can reduce bug handling
   3. Standardized code can reduce maintenance costs
   4. 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.
   
   ```go
   var localIp string
   
   func GetLocalIp() string {
   
   }
   ```
   
   into
   
   ```go
   var localIP string
   
   func GetLocalIP() string {
   
   }
   ```
   
   ```go
   type Service struct {
        name     string
        rcvr     reflect.Value
        rcvrType reflect.Type
        methods  map[string]*MethodType
   }
   ```
   
   into
   
   ```go
   type Service struct {
        name    string
        rv      reflect.Value // receiveValue
        rt      reflect.Type  // receiveType
        methods map[string]*MethodType
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to