title: What is the data structure to be able to contain any type in go?
body: <p>Reference <a href="https://stackoverflow.com/questions/8996771/go-equivalent-of-a-void-pointer-in-c">Go equivalent of a void pointer in C</a></p>
  <p>this is a demo.</p>
  <pre><code>package main
  
  import (
      &quot;fmt&quot;
  )
  
  func map_exist(map_val map[string]interface{}, key string) bool {
      _, ok := map_val[key]
      return ok
  }
  
  func main() {
      var one map[string][]string
      one[&quot;A&quot;] = []string{&quot;a&quot;, &quot;b&quot;, &quot;c&quot;}
      fmt.Println(map_exist(one, &quot;A&quot;))
  
      var two map[string]string
      two[&quot;B&quot;] = &quot;a&quot;
      fmt.Println(map_exist(two, &quot;B&quot;))
  }
  </code></pre>
  <p>run result:</p>
  <blockquote>
  <p>./main.go:15: cannot use one (type map[string][]string) as type map[string]interface {} in argument to map_exist</p>
  <p>./main.go:19: cannot use two (type map[string]string) as type map[string]interface {} in argument to map_exist</p>
  </blockquote>
  <p>I can not find a data structure to be able to contain any type .</p>