title: Make go variable accept multiple types
body: <p>I would like to develop a library in Go which makes use of the different file formats of the debug package in the go standard packages (<a href="http://golang.org/pkg/debug/" rel="nofollow">http://golang.org/pkg/debug/</a>). The idea is to open a file and print out information about that file. 
  Now I would like to automatically recognize the correct file format by testing all relevant file types. For instance, to test if a file is a simple Mach-O or a fat Mach-O file, I am trying to open the file with both Open methods:</p>
  
  <pre><code>  file, err := macho.Open(filename)
    if err != nil {
        fmt.Println("Not an Mach-O file.")
    }
    file, err = macho.OpenFat(filename)
    if err != nil {
        fmt.Println("Not an fat Mach-O file. Exiting.")
        return
    } 
  </code></pre>
  
  <p>Unfortunately the file variable is (of course) type checked, and I get the following error:</p>
  
  <pre><code>cannot assign *macho.FatFile to file (type *macho.File) in multiple assignment
  </code></pre>
  
  <p>I am not even sure of this is the correct way of approaching this. Can anyone point me to the right direction how to perfom this properly?</p>