frostfs-api-go/util/protogen/main.go
Evgenii Stratonikov c1b5f46f98 [#107] protogen: Remove unused parameter
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-08-26 14:36:19 +03:00

27 lines
534 B
Go

package main
import (
"flag"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/util/protogen/internalgengo"
"google.golang.org/protobuf/compiler/protogen"
)
func main() {
var flags flag.FlagSet
genFuzz := flags.Bool("fuzz", false, "generate fuzz tests")
protogen.Options{
ParamFunc: flags.Set,
}.Run(func(gen *protogen.Plugin) error {
for _, f := range gen.Files {
if f.Generate {
internalgengo.GenerateFile(gen, f)
if *genFuzz {
internalgengo.GenerateFuzzTests(gen, f)
}
}
}
return nil
})
}