mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-21 06:35:08 +00:00
Added processor to read the functions in the imported files, and populate the SourceInfo object the same as before
This commit is contained in:
@@ -123,3 +123,15 @@ func (s *SourceInfo) TestSuites() []*TypeInfo {
|
||||
}
|
||||
return s.testSuites
|
||||
}
|
||||
|
||||
func (s *SourceInfo) Merge(srcInfo2 *SourceInfo) {
|
||||
s.StructSpecs = append(s.StructSpecs, srcInfo2.StructSpecs...)
|
||||
s.InitImportPaths = append(s.InitImportPaths, srcInfo2.InitImportPaths...)
|
||||
for k, v := range srcInfo2.ValidationKeys {
|
||||
if _, ok := s.ValidationKeys[k]; ok {
|
||||
utils.Logger.Warn("Warn: Key conflict when scanning validation calls:", "key", k)
|
||||
continue
|
||||
}
|
||||
s.ValidationKeys[k] = v
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user