getFirstSet returns the first map if 1 or more maps are provided. Otherwise it returns the empty map.
(list []map[string]interface{})
| 503 | // getFirstSet returns the first map if 1 or more maps are provided. Otherwise |
| 504 | // it returns the empty map. |
| 505 | func getFirstSet(list []map[string]interface{}) map[string]interface{} { |
| 506 | if len(list) == 0 { |
| 507 | return map[string]interface{}{} |
| 508 | } |
| 509 | return list[0] |
| 510 | } |
| 511 | |
| 512 | func sum(intSlice []int) int { |
| 513 | sum := 0 |
no outgoing calls
no test coverage detected