97ZQ commented on code in PR #3066:
URL: https://github.com/apache/dubbo-go/pull/3066#discussion_r2579263305


##########
compat.go:
##########
@@ -953,6 +999,40 @@ func compatGlobalShutdownConfig(c *config.ShutdownConfig) 
*global.ShutdownConfig
        return cfg
 }
 
+func compatGlobalRouterConfig(c *config.RouterConfig) *global.RouterConfig {
+       if c == nil {
+               return nil
+       }
+       return &global.RouterConfig{
+               Scope:      c.Scope,
+               Key:        c.Key,
+               Force:      c.Force,
+               Runtime:    c.Runtime,
+               Enabled:    c.Enabled,
+               Valid:      c.Valid,
+               Priority:   c.Priority,
+               Conditions: c.Conditions,
+               Tags:       compatGlobalTag(c.Tags),
+               ScriptType: c.ScriptType,
+               Script:     c.Script,
+       }
+}
+
+func compatGlobalTag(c []config.Tag) []global.Tag {
+       if c == nil {
+               return nil
+       }
+       tags := make([]global.Tag, len(c))
+       for i, tag := range c {
+               tags[i] = global.Tag{
+                       Name:      tag.Name,
+                       Match:     tag.Match,
+                       Addresses: tag.Addresses,
+               }
+       }

Review Comment:
   好的,已经修改完了



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