FetchKeys function to get all keys from a map.
(m map[string]V)
| 4 | |
| 5 | // FetchKeys function to get all keys from a map. |
| 6 | func FetchKeys[V any](m map[string]V) []string { |
| 7 | keys := make([]string, 0, len(m)) |
| 8 | for k := range m { |
| 9 | keys = append(keys, k) |
| 10 | } |
| 11 | sort.Strings(keys) |
| 12 | return keys |
| 13 | } |
no outgoing calls
no test coverage detected