title: golang reflect value kind of slice
body: <pre><code>fmt.Println(v.Kind())
  fmt.Println(reflect.TypeOf(v))
  </code></pre>
  
  <p>How can I find out the type of the reflect value of a slice?</p>
  
  <p>The above results in</p>
  
  <pre><code>v.Kind = slice
  typeof = reflect.Value
  </code></pre>
  
  <p>When i try to <code>Set</code> it will crash if i create the wrong slice</p>
  
  <pre><code>t := reflect.TypeOf([]int{})
  s := reflect.MakeSlice(t, 0, 0)
  v.Set(s)
  </code></pre>
  
  <p>For example <code>[]int{}</code> instead of <code>[]string{}</code> so I need to know the exact slice type of the reflect value before I create one.</p>