title: range over interface{} which stores a slice
body: <p>Given the scenario where you have a function which accepts <code>t interface{}</code>. If it is determined that the <code>t</code> is a slice, how do I <code>range</code> over that slice?</p>
  
  <pre><code>func main() {
      data := []string{"one","two","three"}
      test(data)
      moredata := []int{1,2,3}
      test(data)
  }
  
  func test(t interface{}) {
      switch reflect.TypeOf(t).Kind() {
      case reflect.Slice:
          // how do I iterate here?
          for _,value := range t {
              fmt.Println(value)
          }
      }
  }
  </code></pre>
  
  <p>Go Playground Example: <a href="http://play.golang.org/p/DNldAlNShB" rel="noreferrer">http://play.golang.org/p/DNldAlNShB</a></p>