MCPcopy
hub / github.com/SpecterOps/BloodHound / GetLimitParamForGraphQuery

Function GetLimitParamForGraphQuery

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

Source from the content-addressed store, hash-verified

304}
305
306func GetLimitParamForGraphQuery(params url.Values) (int, error) {
307 limit := 0
308
309 if limitStr := params.Get("limit"); limitStr == "" {
310 return 10, nil
311 } else if parsedLimit, err := strconv.Atoi(limitStr); err != nil {
312 return limit, err
313 } else if parsedLimit < 0 {
314 return 0, fmt.Errorf(ErrorInvalidLimit, parsedLimit)
315 } else {
316 return parsedLimit, nil
317 }
318}
319
320func GetOrderForNeo4jQuery(params url.Values) string {
321 var (

Callers 2

Calls 2

ErrorfMethod · 0.80
GetMethod · 0.65

Tested by 1