| 843 | } |
| 844 | |
| 845 | func (g *pyGen) genGoPkg() { |
| 846 | g.gofile.Printf("\n// ---- Package: %s ---\n", g.pkg.Name()) |
| 847 | |
| 848 | g.gofile.Printf("\n// ---- Types ---\n") |
| 849 | g.pywrap.Printf("\n# ---- Types ---\n") |
| 850 | names := universe.names() |
| 851 | for _, n := range names { |
| 852 | sym := universe.sym(n) |
| 853 | if sym.gopkg == nil && sym.goname == "interface{}" { |
| 854 | g.genType(sym, false, false) |
| 855 | continue |
| 856 | } |
| 857 | if sym.gopkg == nil { |
| 858 | continue |
| 859 | } |
| 860 | if !sym.isType() || sym.gopkg.Path() != g.pkg.pkg.Path() { |
| 861 | continue |
| 862 | } |
| 863 | g.genType(sym, false, false) // not exttypes |
| 864 | } |
| 865 | } |
| 866 | |
| 867 | // genStringerCall generates a call to either self.String() or self.string() |
| 868 | // depending on RenameCase option |