ResetPackages resets any accumulated packages -- needed when doing tests
()
| 42 | |
| 43 | // ResetPackages resets any accumulated packages -- needed when doing tests |
| 44 | func ResetPackages() { |
| 45 | universeMutex.Lock() |
| 46 | defer universeMutex.Unlock() |
| 47 | Packages = nil |
| 48 | makeGoPackage() |
| 49 | current = newSymtab(nil, universe) |
| 50 | } |
| 51 | |
| 52 | // NewPackage creates a new Package, tying types.Package and ast.Package together. |
| 53 | func NewPackage(pkg *types.Package, doc *doc.Package) (*Package, error) { |