chore: remove unused field

This commit is contained in:
Skyxim 2023-03-31 20:57:26 +08:00
parent 858d9de250
commit 3a4b5fb145

View File

@ -108,8 +108,8 @@ func (ss *DomainSet) Has(key string) bool {
// go to next level // go to next level
nodeId, bmIdx := 0, 0 nodeId, bmIdx := 0, 0
type wildcardCursor struct { type wildcardCursor struct {
nodeId, bmIdx, index int bmIdx, index int
find bool find bool
} }
cursor := wildcardCursor{} cursor := wildcardCursor{}
for i := 0; i < len(key); i++ { for i := 0; i < len(key); i++ {
@ -132,7 +132,7 @@ func (ss *DomainSet) Has(key string) bool {
bmIdx = nextBmIdx bmIdx = nextBmIdx
nodeId = nextNodeId nodeId = nextNodeId
i = j i = j
cursor.find=false cursor.find = false
goto RESTART goto RESTART
} }
} }
@ -145,10 +145,9 @@ func (ss *DomainSet) Has(key string) bool {
} else if ss.labels[bmIdx-nodeId] == wildcardByte { } else if ss.labels[bmIdx-nodeId] == wildcardByte {
cursor.find = true cursor.find = true
cursor.bmIdx = bmIdx cursor.bmIdx = bmIdx
cursor.nodeId = nodeId
cursor.index = i cursor.index = i
} else if ss.labels[bmIdx-nodeId] == c { } else if ss.labels[bmIdx-nodeId] == c {
cursor.find=false cursor.find = false
break break
} }
} }