From f69088bd27a2541404630c58d6a82f95c8fe63d4 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Tue, 30 Mar 2021 18:30:58 +0300 Subject: [PATCH] fallback to generate client and server Signed-off-by: Vasiliy Tolstov --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index c96e2c9..296df14 100644 --- a/main.go +++ b/main.go @@ -48,6 +48,12 @@ func (g *Generator) Generate(plugin *protogen.Plugin) error { if strings.Contains(g.components, "client") { genClient = true } + if strings.Contains(g.components, "rpc") || strings.Contains(g.components, "http") { + if !genServer && !genClient { + genServer = true + genClient = true + } + } // Protoc passes a slice of File structs for us to process for _, component := range strings.Split(g.components, "|") {