csueiras / reinforcer

codegen for easy adoption of resiliency patterns
MIT License
8 stars 2 forks source link

inaccurate error message when supplying a file with no interfaces #30

Closed tzachshabtay closed 3 years ago

tzachshabtay commented 3 years ago

When giving a single file to reinforcer which has no interface, i.e like this:

reinforcer -s ./myfile.go --targetall --outputdir=./reinforced

If the file doesn't have interfaces in it, this error is returned:

failed to generate code; error=must provide at least one file for generation

This is confusing as a file was provided, a better error message in this case would be:

failed to generate code; error=must provide at least one interface for generation