MCPcopy Index your code
hub / github.com/SpecterOps/BloodHound / GetSkipParamForGraphQuery

Function GetSkipParamForGraphQuery

cmd/api/src/utils/util.go:292–304  ·  view source on GitHub ↗
(params url.Values)

Source from the content-addressed store, hash-verified

290}
291
292func GetSkipParamForGraphQuery(params url.Values) (int, error) {
293 skip := 0
294
295 if skipStr := params.Get("skip"); skipStr == "" {
296 return 0, nil
297 } else if parsedSkip, err := strconv.Atoi(skipStr); err != nil {
298 return skip, err
299 } else if parsedSkip < 0 {
300 return 0, fmt.Errorf(ErrorInvalidSkip, parsedSkip)
301 } else {
302 return parsedSkip, nil
303 }
304}
305
306func GetLimitParamForGraphQuery(params url.Values) (int, error) {
307 limit := 0

Callers 3

Calls 2

ErrorfMethod · 0.80
GetMethod · 0.65

Tested by 2