[#103] protogen: Handle files in all packages

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-08-09 10:19:37 +03:00
parent a0a9b765f3
commit ff4f31b6f3

View file

@ -16,11 +16,7 @@ var (
func main() {
protogen.Options{}.Run(func(gen *protogen.Plugin) error {
for _, f := range gen.Files {
//if !f.Generate {
// continue
//}
imp := string(f.GoImportPath)
if strings.HasSuffix(imp, "/tree") || strings.HasSuffix(imp, "/control") {
if f.Generate {
generateFile(gen, f)
}
}