Upatede Error type to SourceError

Added processor object to code
Verified compile errors appearing
Signed-off-by: notzippy@gmail.com
This commit is contained in:
notzippy@gmail.com
2020-04-25 15:32:29 -07:00
parent 9a9511d28f
commit 548cbc1764
10 changed files with 282 additions and 99 deletions

View File

@@ -85,7 +85,7 @@ func (pc *processContainer) processPath(path string, info os.FileInfo, err error
if err != nil {
if errList, ok := err.(scanner.ErrorList); ok {
var pos = errList[0].Pos
newError := &utils.Error{
newError := &utils.SourceError{
SourceType: ".go source",
Title: "Go Compilation Error",
Path: pos.Filename,

View File

@@ -1,18 +0,0 @@
package parser
import (
//"golang.org/x/tools/go/packages"
//"github.com/revel/cmd/utils"
)
//import "golang.org/x/tools/go/packages"
//
//func GetPackage(appPath, importPath string) {
// config := &packages.Config{
// Mode: packages.NeedName | packages.NeedFiles,
// Dir:appPath,
// }
//
// pkgs, err := packages.Load(config, []string{importPath})
// utils.Logger.Info("Loaded packegs ", "len results", len(pkgs), "error",err)
//
//}