MCPcopy Index your code
hub / github.com/google/codesearch / mergeOr

Function mergeOr

index/read.go:389–408  ·  view source on GitHub ↗
(l1, l2 []uint32)

Source from the content-addressed store, hash-verified

387}
388
389func mergeOr(l1, l2 []uint32) []uint32 {
390 var l []uint32
391 i := 0
392 j := 0
393 for i < len(l1) || j < len(l2) {
394 switch {
395 case j == len(l2) || (i < len(l1) && l1[i] < l2[j]):
396 l = append(l, l1[i])
397 i++
398 case i == len(l1) || (j < len(l2) && l1[i] > l2[j]):
399 l = append(l, l2[j])
400 j++
401 case l1[i] == l2[j]:
402 l = append(l, l1[i])
403 i++
404 j++
405 }
406 }
407 return l
408}
409
410func corrupt() {
411 log.Fatal("corrupt index: remove " + File())

Callers 1

postingQueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…