MCPcopy Index your code
hub / github.com/cloudfoundry/cli / List

Function List

util/extract/extract.go:24–35  ·  view source on GitHub ↗
(expr string, input interface{})

Source from the content-addressed store, hash-verified

22}
23
24func List(expr string, input interface{}) []string {
25 var result []string
26 app := func(v string) {
27 result = append(result, v)
28 }
29
30 path := strings.Split(expr, ".")
31 val := reflect.ValueOf(input)
32
33 extract(app, path, val)
34 return result
35}
36
37func extract(app appender, path []string, input reflect.Value) {
38 switch input.Kind() {

Callers 3

extract_test.goFile · 0.92
UniqueListFunction · 0.85
FirstFunction · 0.85

Calls 1

extractFunction · 0.85

Tested by

no test coverage detected