lint: stop using deprecated go/packages api (#87)

The packages.Load* constants have been deprecated in favor of packages.Need*.
This commit is contained in:
Michael McLoughlin
2019-06-13 11:20:49 -07:00
committed by GitHub
parent 83fbad1a6b
commit 3355ecfbfd
2 changed files with 2 additions and 2 deletions

View File

@@ -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.LoadAllSyntax,
Mode: packages.NeedTypes | packages.NeedDeps,
}
pkgs, err := packages.Load(cfg, path)
if err != nil {