case insensitive peer lookup
This commit is contained in:
parent
f3b7a82091
commit
2c5c3eea32
@ -4,7 +4,6 @@ import (
|
||||
"github.com/ecix/alice-lg/backend/api"
|
||||
|
||||
"log"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -120,7 +119,7 @@ func (self *NeighboursStore) LookupNeighboursAt(
|
||||
neighbours := self.neighboursMap[sourceId]
|
||||
|
||||
for _, neighbour := range neighbours {
|
||||
if !strings.Contains(neighbour.Description, query) {
|
||||
if !ContainsCi(neighbour.Description, query) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ func TestNeighbourLookupAt(t *testing.T) {
|
||||
"ID2233_AS2343",
|
||||
}
|
||||
|
||||
neighbours := store.LookupNeighboursAt(1, "Peer 1")
|
||||
neighbours := store.LookupNeighboursAt(1, "peer 1")
|
||||
|
||||
// Make index
|
||||
index := NeighboursIndex{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user