MCPcopy Index your code
hub / github.com/devploit/nomore403 / selectRandomCombinations

Function selectRandomCombinations

cmd/requester.go:1670–1680  ·  view source on GitHub ↗

selectRandomCombinations selects up to n random combinations from a list of combinations.

(combinations []string, n int)

Source from the content-addressed store, hash-verified

1668
1669// selectRandomCombinations selects up to n random combinations from a list of combinations.
1670func selectRandomCombinations(combinations []string, n int) []string {
1671 if len(combinations) <= n {
1672 return combinations
1673 }
1674
1675 rand.Shuffle(len(combinations), func(i, j int) {
1676 combinations[i], combinations[j] = combinations[j], combinations[i]
1677 })
1678
1679 return combinations[:n]
1680}
1681
1682// requestDefault makes HTTP request to check the default response
1683func requestDefault(options RequestOptions) {

Callers 2

requestPathCaseSwitchingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected