GetSortedKeys returns sorted keys of map[string]interface{}
(object map[string]interface{})
| 218 | |
| 219 | // GetSortedKeys returns sorted keys of map[string]interface{} |
| 220 | func GetSortedKeys(object map[string]interface{}) []string { |
| 221 | keys := []string{} |
| 222 | for key := range object { |
| 223 | keys = append(keys, key) |
| 224 | } |
| 225 | sort.Sort(stringSlice(keys)) |
| 226 | return keys |
| 227 | } |
| 228 | |
| 229 | type stringSlice []string |
| 230 |
no test coverage detected