Hi, I wrote a function that would return a sorted slice of strings from a
map[string]Foo. I'm curious what is the best way to create a generic
routine that can return a sorted slice of strings from any type that is a
map with strings as keys.
I know it can be done by passing interface{} and using the reflect module
to explicitly check the passed type. Is there a way to do it using an
interface specification? For example, is there any way to do something
like:
type MapWithStringKey interface {
..
}
To implement the interface above, a type would need strings as keys.
Thanks,
Bill
--