Function
setKey
(m map[string]interface{}, key string, value interface{})
Source from the content-addressed store, hash-verified
| 195 | } |
| 196 | |
| 197 | func setKey(m map[string]interface{}, key string, value interface{}) { |
| 198 | if value != nil { |
| 199 | switch t := value.(type) { |
| 200 | case []interface{}: |
| 201 | if t == nil { |
| 202 | return |
| 203 | } |
| 204 | case map[string]interface{}: |
| 205 | if t == nil { |
| 206 | return |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | m[key] = value |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | // ApplyPatches applies the patches to the config if defined |
| 215 | func ApplyPatches(data map[string]interface{}, profile *latest.ProfileConfig) (map[string]interface{}, error) { |
Tested by
no test coverage detected