fallback to generate client and server
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
be4eac21df
commit
f69088bd27
6
main.go
6
main.go
@ -48,6 +48,12 @@ func (g *Generator) Generate(plugin *protogen.Plugin) error {
|
|||||||
if strings.Contains(g.components, "client") {
|
if strings.Contains(g.components, "client") {
|
||||||
genClient = true
|
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
|
// Protoc passes a slice of File structs for us to process
|
||||||
for _, component := range strings.Split(g.components, "|") {
|
for _, component := range strings.Split(g.components, "|") {
|
||||||
|
Loading…
Reference in New Issue
Block a user