title: Getting all map keys for different content map[string]
body: <p>I have a general enough function for going through a map[string] and getting all keys:</p>
  <pre><code>i := 0
  keys := make([]string, len(input))
  for k := range input {
      keys[i] = k
      i++
  }
  return keys
  </code></pre>
  <p>My problem is I have two different inputs I want to throw in here, a <strong>map[string]MyStruct</strong> and <strong>map[string][][]float64</strong>. Whenever I've tried having the input to the func as <em>map[string]interface{}</em>, go resists all my attempts to try to cast the map[string]MyStruct as a map[string]interface{}. Is there a way I can do this without needing to have two functions, one with map[string]MyStruct as input, and one with map[string][][]float64? The contents of the map[string] don't matter at this point, because I'm just trying to get all the keys of them for use later in the code. This needs to be a function that's called; We're using Sonar, and it's set to refuse code duplication, so I can't have this code snippet duplicated.</p>