mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Merge branch 'develop' into lint
This commit is contained in:
@@ -295,12 +295,11 @@ func (rp *RevelContainer) ResolveImportPath(importPath string) (string, error) {
|
||||
return filepath.Join(rp.SourcePath, importPath), nil
|
||||
}
|
||||
config := &packages.Config{
|
||||
// TODO: packages.LoadSyntax deprecated, Need instead
|
||||
//nolint:staticcheck
|
||||
Mode: packages.LoadSyntax,
|
||||
Dir: rp.AppPath,
|
||||
Mode: packages.NeedName | packages.NeedFiles | packages.NeedCompiledGoFiles | packages.NeedImports |
|
||||
packages.NeedTypes | packages.NeedTypesSizes | packages.NeedSyntax | packages.NeedTypesInfo,
|
||||
Dir: rp.AppPath,
|
||||
}
|
||||
|
||||
config.Env = utils.ReducedEnv(false)
|
||||
pkgs, err := packages.Load(config, importPath)
|
||||
if len(pkgs) == 0 {
|
||||
return "", fmt.Errorf("%w %s using app path %s", ErrNoPackages, importPath, rp.AppPath)
|
||||
|
||||
Reference in New Issue
Block a user