forked from vieter-v/vieter
chore: update docs; final read
parent
39a026fdb3
commit
398e2bd9eb
|
@ -55,6 +55,8 @@ Parameter | Description
|
||||||
limit | Maximum amount of results to return.
|
limit | Maximum amount of results to return.
|
||||||
offset | Offset of results.
|
offset | Offset of results.
|
||||||
repo | Limit results to targets that publish to the given repo.
|
repo | Limit results to targets that publish to the given repo.
|
||||||
|
query | Only return targets that have this substring in their URL, path or branch.
|
||||||
|
arch | Only return targets that publish to this arch.
|
||||||
|
|
||||||
## Get specific target
|
## Get specific target
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ fn (mut ti TargetsIterator) advance_window() {
|
||||||
|| it.path.contains(ti.filter.query) || it.branch.contains(ti.filter.query))
|
|| it.path.contains(ti.filter.query) || it.branch.contains(ti.filter.query))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We break out of the loop once we found a non-empty window
|
||||||
if ti.window.len > 0 {
|
if ti.window.len > 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -75,7 +76,8 @@ pub fn (mut ti TargetsIterator) next() ?Target {
|
||||||
return none
|
return none
|
||||||
}
|
}
|
||||||
|
|
||||||
// The first call to `next` will cause the sliding window to move to where the requested offset starts
|
// The first call to `next` will cause the sliding window to move to where
|
||||||
|
// the requested offset starts
|
||||||
if !ti.started {
|
if !ti.started {
|
||||||
ti.advance_window()
|
ti.advance_window()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue