| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Any is the preferred over interface{} now in Go.
|
| | |
|
| |
|
|
| |
They are shorter, more readable, and don't require temp vars.
|
| |
|
|
|
| |
The function is similar to minimize.Slice(), but it allows to designate
a subset of slice elements that must always remain.
|
|
|
Given a set of chunks and a predicate, the algorithm does the following:
a) If the chunk is not needed (*), drop it.
b) Split the chunk in two and attempt to drop these halves individually.
Optimizations are applied to avoid unneeded predicate invokations.
Also, the algorithm proceeds from larger to smaller chunks, thus
providing on average the best possible result at each step.
This represents the generic functionality needed both for program
bisection in pkg/repro and kernel config bisection in pkg/kconfig.
(*) Needed means that the predicate returns true when the chunk is
present and false when it's removed.
|