flycash commented on a change in pull request #1604:
URL: https://github.com/apache/dubbo-go/pull/1604#discussion_r758349587



##########
File path: config/method_config.go
##########
@@ -70,9 +76,34 @@ func initProviderMethodConfig(sc *ServiceConfig) error {
 }
 
 // check set default value and verify
-func (mc *MethodConfig) check() error {
-       if err := defaults.Set(mc); err != nil {
+func (m *MethodConfig) check() error {
+       qualifieldMethodName := m.InterfaceName + "#" + m.Name
+       if m.TpsLimitStrategy != "" {
+               _ = extension.GetTpsLimitStrategyCreator(m.TpsLimitStrategy)

Review comment:
       why we call this? you don't use the return value.

##########
File path: config/method_config.go
##########
@@ -70,9 +76,34 @@ func initProviderMethodConfig(sc *ServiceConfig) error {
 }
 
 // check set default value and verify
-func (mc *MethodConfig) check() error {
-       if err := defaults.Set(mc); err != nil {
+func (m *MethodConfig) check() error {
+       qualifieldMethodName := m.InterfaceName + "#" + m.Name
+       if m.TpsLimitStrategy != "" {
+               _ = extension.GetTpsLimitStrategyCreator(m.TpsLimitStrategy)

Review comment:
       I prefer that you add one more function to check if the creator exist. 
And then you log error here.




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