GetKeys converts a KeyedList into a slice of string by calling Key() on each element in the list.
()
| 37 | // GetKeys converts a KeyedList into a slice of string by calling Key() on each |
| 38 | // element in the list. |
| 39 | func (l KeyedList) GetKeys() []string { |
| 40 | var res []string |
| 41 | for _, keyed := range l { |
| 42 | res = append(res, keyed.Key()) |
| 43 | } |
| 44 | return res |
| 45 | } |
| 46 | |
| 47 | // TopLevelLists is a map that contains several Devfile top-level lists |
| 48 | // (such as `Commands`, `Components`, `Projects`, ...), available as `KeyedList`s. |