nic-chen commented on a change in pull request #847:
URL: https://github.com/apache/apisix-dashboard/pull/847#discussion_r528511571



##########
File path: api/internal/core/entity/format.go
##########
@@ -17,26 +17,30 @@
 package entity
 
 import (
-       "log"
        "strconv"
        "strings"
+
+       "github.com/apisix/manager-api/log"
 )
 
 func NodesFormat(obj interface{}) interface{} {
        var nodes []*Node
-       if value, ok := obj.(map[string]float64); ok {
+       switch objType := obj.(type) {
+       case map[string]float64:
+               log.Infof("nodes type: %v", objType)
                var strArr []string
+               value := obj.(map[string]float64)
                for key, val := range value {
                        node := &Node{}
                        strArr = strings.Split(key, ":")

Review comment:
       updated.

##########
File path: api/internal/core/entity/format.go
##########
@@ -46,13 +50,35 @@ func NodesFormat(obj interface{}) interface{} {
                        nodes = append(nodes, node)

Review comment:
       updated.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to