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

Function getChildValueStrings

commands/util.go:587–605  ·  view source on GitHub ↗
(keyValueArr whisk.KeyValueArr, key string, childKey string)

Source from the content-addressed store, hash-verified

585}
586
587func getChildValueStrings(keyValueArr whisk.KeyValueArr, key string, childKey string) []string {
588 var keys []interface{}
589 var res []string
590
591 keys = getChildValues(keyValueArr, key, childKey)
592
593 for i := 0; i < len(keys); i++ {
594 castedValue, canCast := keys[i].(string)
595 if canCast {
596 res = append(res, castedValue)
597 }
598 }
599
600 sort.Strings(res)
601 whisk.Debug(whisk.DbgInfo, "Got values '%s' from '%v' for key '%s' and child key '%s'\n", res, keyValueArr, key,
602 childKey)
603
604 return res
605}
606
607func getValueFromJSONResponse(field string, response map[string]interface{}) interface{} {
608 var res interface{}

Callers 1

getParamUnionFunction · 0.85

Calls 1

getChildValuesFunction · 0.85

Tested by

no test coverage detected