(parent map[string]interface{}, key string)
| 1493 | } |
| 1494 | |
| 1495 | func ensureChildMap(parent map[string]interface{}, key string) map[string]interface{} { |
| 1496 | if child, ok := parent[key].(map[string]interface{}); ok { |
| 1497 | return child |
| 1498 | } |
| 1499 | child := map[string]interface{}{} |
| 1500 | parent[key] = child |
| 1501 | return child |
| 1502 | } |
| 1503 | |
| 1504 | func structToMap(value interface{}) (map[string]interface{}, error) { |
| 1505 | payload, err := json.Marshal(value) |
no outgoing calls
no test coverage detected