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

Function within

internal/attachments/references.go:553–560  ·  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

551
552// within reports whether i falls inside any of ranges.
553func within(ranges []byteRange, i int) bool {
554 for _, s := range ranges {
555 if i >= s.start && i < s.stop {
556 return true
557 }
558 }
559 return false
560}
561
562// inlineDestination finds the destination written beside a reference, as the
563// "./f.png" of [text](./f.png).

Callers 1

closingBracketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected