Updated shared build environments

Updated check for errors.
Updated go.mod
Added .vscode launch
This commit is contained in:
notzippy@gmail.com
2022-02-20 17:16:12 -08:00
parent b562bd2dc5
commit ea5acb720f
10 changed files with 125 additions and 52 deletions

View File

@@ -273,12 +273,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 "", errors.New("No packages found for import " + importPath + " using app path " + rp.AppPath)