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



##########
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:
       考虑到当前使用场景,min是必填的,所以从指针改为引用了,#1380 这个pr的第一个commit就是两者皆为指针




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