OLD | NEW |
1 package data | 1 package data |
2 | 2 |
3 import ( | 3 import ( |
4 "bytes" | 4 "bytes" |
5 "encoding/gob" | 5 "encoding/gob" |
6 "fmt" | 6 "fmt" |
7 "sort" | 7 "sort" |
8 "sync" | 8 "sync" |
9 | 9 |
10 "github.com/skia-dev/glog" | 10 "github.com/skia-dev/glog" |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 } | 456 } |
457 | 457 |
458 // containsName returns the FuzzReport and true if a fuzz with the given name is
in the list. | 458 // containsName returns the FuzzReport and true if a fuzz with the given name is
in the list. |
459 func (p SortedFuzzReports) containsName(fuzzName string) (FuzzReport, bool) { | 459 func (p SortedFuzzReports) containsName(fuzzName string) (FuzzReport, bool) { |
460 i := sort.Search(len(p), func(i int) bool { return p[i].FuzzName >= fuzz
Name }) | 460 i := sort.Search(len(p), func(i int) bool { return p[i].FuzzName >= fuzz
Name }) |
461 if i < len(p) && p[i].FuzzName == fuzzName { | 461 if i < len(p) && p[i].FuzzName == fuzzName { |
462 return p[i], true | 462 return p[i], true |
463 } | 463 } |
464 return FuzzReport{}, false | 464 return FuzzReport{}, false |
465 } | 465 } |
OLD | NEW |