-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
this works var f interface { ImportedLibraries() ([]string, os.Error) ImportedSymbols() ([]string, os.Error) } var err1, err2 os.Error if f, err1 = elf.Open(obj); err1 != nil { if f, err2 = macho.Open(obj); err2 != nil { fatal("cannot parse %s as ELF (%v) or Mach-O (%v)", obj, err1, err2) } } var err os.Error syms, err = f.ImportedSymbols() if err != nil { fatal("cannot load dynamic symbols: %v", err) } imports, err = f.ImportedLibraries() if err != nil { fatal("cannot load dynamic imports: %v", err) } return but swapping the two methods in the interface definition makes each of the calls call the wrong method. probably something about interface types inside function bodies.