mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Updated scanner
Removed scanning all the import statements, this is not needed Added recursive scan for revel import path to pick up testunits
This commit is contained in:
@@ -174,8 +174,10 @@ func (c *CommandConfig) initAppFolder() (err error) {
|
||||
|
||||
// Use app folder to read the go.mod if it exists and extract the package information
|
||||
goModFile := filepath.Join(appFolder, "go.mod")
|
||||
utils.Logger.Info("Checking gomod, extracting from file", "path", goModFile,"exists", utils.Exists(goModFile))
|
||||
if utils.Exists(goModFile) {
|
||||
c.Vendored = true
|
||||
utils.Logger.Info("Found go mod, extracting from file", "path", goModFile)
|
||||
file, err := ioutil.ReadFile(goModFile)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -220,7 +222,7 @@ func (c *CommandConfig) initAppFolder() (err error) {
|
||||
c.AppPath = appFolder
|
||||
}
|
||||
|
||||
utils.Logger.Info("Set application path", "path", c.AppPath)
|
||||
utils.Logger.Info("Set application path", "path", c.AppPath, "vendored",c.Vendored, "importpath",c.ImportPath)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user