Go stdlib package — slices. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.
.BinarySearch()NeutralBinarySearch(x S, target E) (int, bool)
BinarySearch searches for target in a sorted slice and returns the position
.BinarySearchFunc()NeutralBinarySearchFunc(x S, target T, cmp func(E, T) int) (int, bool)
BinarySearchFunc works like [BinarySearch], but uses a custom comparison
.Clip()NeutralClip(s S) S
Clip removes unused capacity from the slice, returning s[:len(s):len(s)].
.Compact()NeutralCompact(s S) S
Compact replaces consecutive runs of equal elements with a single copy.
.CompactFunc()NeutralCompactFunc(s S, eq func(E, E) bool) S
CompactFunc is like [Compact] but uses an equality function to compare elements.
.Compare()NeutralCompare(s1 S, s2 S) int
Compare compares the elements of s1 and s2, using [cmp.Compare] on each pair
.CompareFunc()NeutralCompareFunc(s1 S1, s2 S2, cmp func(E1, E2) int) int
CompareFunc is like [Compare] but uses a custom comparison function on each
.ContainsFunc()NeutralContainsFunc(s S, f func(E) bool) bool
ContainsFunc reports whether at least one
| FQN | Field | |
|---|---|---|
| slices | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import ... # slices