Mulavar commented on a change in pull request #1388:
URL: https://github.com/apache/dubbo-go/pull/1388#discussion_r691742697



##########
File path: remoting/getty/config.go
##########
@@ -179,6 +184,23 @@ func (c *GettySessionParam) CheckValidity() error {
        return nil
 }
 
+func parseTimeDurationByRange(timeStr string, min time.Duration, max 
*time.Duration) (time.Duration, error) {
+       result, err := time.ParseDuration(timeStr)
+       if err != nil {
+               return min, err
+       }
+       if max != nil && min > *max {
+               min, max = *max, &min
+       }
+       if result < min {

Review comment:
       从方法名上看是将 timeStr 限定在 [min, max] 中,那 min 是不是应该和 max 一样判空。




-- 
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