build: use packages.NeedImports (#91)
Use packages.NeedImports when loading packages. This fixes avo to account for a bugfix in golang/tools@aac0b97. Closes #90
This commit is contained in:
committed by
GitHub
parent
cad456ebde
commit
8f97788836
@@ -35,7 +35,7 @@ func NewContext() *Context {
|
||||
// Package sets the package the generated file will belong to. Required to be able to reference types in the package.
|
||||
func (c *Context) Package(path string) {
|
||||
cfg := &packages.Config{
|
||||
Mode: packages.NeedTypes | packages.NeedDeps,
|
||||
Mode: packages.NeedTypes | packages.NeedDeps | packages.NeedImports,
|
||||
}
|
||||
pkgs, err := packages.Load(cfg, path)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user