(keyValueArr whisk.KeyValueArr, key string, childKey string)
| 559 | } |
| 560 | |
| 561 | func getChildValues(keyValueArr whisk.KeyValueArr, key string, childKey string) []interface{} { |
| 562 | var value interface{} |
| 563 | var res []interface{} |
| 564 | |
| 565 | value = keyValueArr.GetValue(key) |
| 566 | |
| 567 | castedValue, canCast := value.([]interface{}) |
| 568 | if canCast { |
| 569 | for i := 0; i < len(castedValue); i++ { |
| 570 | castedValue, canCast := castedValue[i].(map[string]interface{}) |
| 571 | if canCast { |
| 572 | for subKey, subValue := range castedValue { |
| 573 | if subKey == childKey { |
| 574 | res = append(res, subValue) |
| 575 | } |
| 576 | } |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | whisk.Debug(whisk.DbgInfo, "Got values '%s' from '%v' for key '%s' and child key '%s'\n", res, keyValueArr, key, |
| 582 | childKey) |
| 583 | |
| 584 | return res |
| 585 | } |
| 586 | |
| 587 | func getChildValueStrings(keyValueArr whisk.KeyValueArr, key string, childKey string) []string { |
| 588 | var keys []interface{} |
no outgoing calls
no test coverage detected