From 15a33126b0e296376f347f98892f5ce3d5830149 Mon Sep 17 00:00:00 2001 From: Michael McLoughlin Date: Sat, 14 May 2022 15:29:43 -0700 Subject: [PATCH] parse module from go package --- build/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/context.go b/build/context.go index cbfc639c..77d487b5 100644 --- a/build/context.go +++ b/build/context.go @@ -39,7 +39,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 | packages.NeedImports, + Mode: packages.NeedTypes | packages.NeedDeps | packages.NeedImports | packages.NeedModule, } pkgs, err := packages.Load(cfg, path) if err != nil {