Handle no matches

This commit is contained in:
Radim Marek 2015-12-04 23:21:28 +01:00
parent 12f594779c
commit d1216f409d

View file

@ -194,6 +194,10 @@ func (p *parser) doImport() error {
return p.Errf("Failed to use import pattern %s - %s", importPattern, err.Error())
}
if len(matches) == 0 {
return p.Errf("No files matching the import pattern %s", importPattern)
}
for _, importFile := range matches {
if err := p.doSingleImport(importFile); err != nil {
return err