| | |
| | | } |
| | | |
| | | // modify by long. |
| | | func (s *ShardMap) Walk(wf wfOp, cfrom string) []protomsg.Baseinfo{ |
| | | func (s *ShardMap) Walk(wf wfOp, cfrom string) []*protomsg.Baseinfo{ |
| | | var wg sync.WaitGroup |
| | | var second float32 |
| | | |
| | | var baseinfos []protomsg.Baseinfo |
| | | var baseinfos []*protomsg.Baseinfo |
| | | |
| | | for _, si := range s.shards { |
| | | wg.Add(1) |
| | |
| | | if second == -1 { |
| | | continue |
| | | } |
| | | if info, ok := value.(protomsg.Baseinfo) ;ok { |
| | | if info, ok := value.(*protomsg.Baseinfo) ;ok { |
| | | fmt.Println("比对分数: ", second) |
| | | info.CompareScore = second |
| | | baseinfos = append(baseinfos,info) |