MCPcopy Create free account
hub / github.com/apache/openwhisk-cli / Swap

Function Swap

commands/util.go:179–179  ·  view source on GitHub ↗

Uses quickSort to sort commands based on their compare methods Param: Takes in a array of Sortable interfaces which contains a specific command

(sortables Sortables, i, j int)

Source from the content-addressed store, hash-verified

177// Uses quickSort to sort commands based on their compare methods
178// Param: Takes in a array of Sortable interfaces which contains a specific command
179func Swap(sortables Sortables, i, j int) { sortables[i], sortables[j] = sortables[j], sortables[i] }
180
181func toPrintable(sortable []whisk.Sortable) []whisk.Printable {
182 sortedPrintable := make([]whisk.Printable, len(sortable), len(sortable))

Callers 1

quickSortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected