MCPcopy Create free account
hub / github.com/cli/cli / within

Function within

internal/attachments/references.go:590–597  ·  view source on GitHub ↗

within reports whether i falls inside any of ranges.

(ranges []byteRange, i int)

Source from the content-addressed store, hash-verified

588
589// within reports whether i falls inside any of ranges.
590func within(ranges []byteRange, i int) bool {
591 for _, s := range ranges {
592 if i >= s.start && i < s.stop {
593 return true
594 }
595 }
596 return false
597}
598
599// inlineDestination finds the destination written beside a reference, as the
600// "./f.png" of [text](./f.png).

Callers 1

closingBracketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected