ChangedenCZD commented on a change in pull request #1388:
URL: https://github.com/apache/dubbo-go/pull/1388#discussion_r691751786
##########
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 {
Review comment:
我考虑是函数内部处理好这些err,而不是交由调用方处理。
这个问题值得探讨。
--
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]