mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Updated sourceinfo
Added packagepathmap to the SourceInfo, this in turn allows the RevelCLI app command to pass the source paths directly to Revel directly Added default to build to be "target" of the current folder Renamed source processor
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"go/ast"
|
||||
"go/token"
|
||||
"strings"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -32,6 +33,8 @@ func (s *SourceInfoProcessor) processPackage(p *packages.Package) (sourceInfo *m
|
||||
)
|
||||
for _,tree := range p.Syntax {
|
||||
for _, decl := range tree.Decls {
|
||||
s.sourceProcessor.packageMap[p.PkgPath] = filepath.Dir(p.Fset.Position(decl.Pos()).Filename)
|
||||
//println("*** checking", p.Fset.Position(decl.Pos()).Filename)
|
||||
spec, found := s.getStructTypeDecl(decl, p.Fset)
|
||||
if found {
|
||||
if isController || isTest {
|
||||
|
||||
Reference in New Issue
Block a user