MCPcopy Create free account
hub / github.com/elimity-com/scim / clamp

Function clamp

utils.go:9–19  ·  view source on GitHub ↗
(offset, limit, length int)

Source from the content-addressed store, hash-verified

7)
8
9func clamp(offset, limit, length int) (int, int) {
10 start := length
11 if offset < length {
12 start = offset
13 }
14 end := length
15 if limit < length-start {
16 end = start + limit
17 }
18 return start, end
19}
20
21func contains(arr []string, el string) bool {
22 for _, item := range arr {

Callers 2

resourceTypesHandlerMethod · 0.85
schemasHandlerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…