asMap asserts that v is a map[string]interface{}, returning false if not. Callers should warn when this fails on user input, as it signals malformed YAML.
(v interface{})
| 39 | // asMap asserts that v is a map[string]interface{}, returning false if not. |
| 40 | // Callers should warn when this fails on user input, as it signals malformed YAML. |
| 41 | func asMap(v interface{}) (map[string]interface{}, bool) { |
| 42 | m, ok := v.(map[string]interface{}) |
| 43 | return m, ok |
| 44 | } |
| 45 | |
| 46 | // extractNestedMap walks a path of keys through a nested map structure and |
| 47 | // returns the map at that path. Returns nil, false if any key is missing or |
no outgoing calls
no test coverage detected