Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f69088bd27 | |||
be4eac21df |
8
main.go
8
main.go
@@ -12,7 +12,7 @@ import (
|
||||
var (
|
||||
flagDebug = flag.Bool("debug", false, "")
|
||||
flagStandalone = flag.Bool("standalone", false, "")
|
||||
flagComponents = flag.String("components", "micro|rpc|client|server", "")
|
||||
flagComponents = flag.String("components", "micro|rpc|http|client|server", "")
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -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, "|") {
|
||||
|
Reference in New Issue
Block a user