mirror of
https://github.com/TECHNOFAB11/powerproto.git
synced 2025-12-14 08:53:48 +01:00
chore(*): update plugin default options && add examples
Signed-off-by: storyicon <yuanchao@bilibili.com>
This commit is contained in:
parent
bc28762992
commit
4f4006ee7d
18 changed files with 342 additions and 10 deletions
|
|
@ -15,8 +15,6 @@
|
|||
package build
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/AlecAivazis/survey/v2"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
|
|
@ -113,7 +111,6 @@ func CommandInit(log logger.Logger) *cobra.Command {
|
|||
config.Options = append(config.Options, plugin.Options...)
|
||||
}
|
||||
}
|
||||
fmt.Println(">>>>>>>>>>>>>>", preference.Repositories)
|
||||
for _, val := range preference.Repositories {
|
||||
if repo, ok := GetRepositoryFromOptionsValue(val); ok {
|
||||
config.Repositories[repo.Name] = repo.Pkg
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ func GetWellKnownPlugins() []*Plugin {
|
|||
Pkg: "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest",
|
||||
Options: []string{
|
||||
"--grpc-gateway_out=.",
|
||||
"--grpc-gateway_opt=paths=source_relative",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -91,14 +92,16 @@ func GetWellKnownPlugins() []*Plugin {
|
|||
Name: "protoc-gen-gogo",
|
||||
Pkg: "github.com/gogo/protobuf/protoc-gen-gogo@latest",
|
||||
Options: []string{
|
||||
"--gogo_out=.",
|
||||
"--gogo_out=plugins=grpc:.",
|
||||
"--gogo_opt=paths=source_relative",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "protoc-gen-gofast",
|
||||
Pkg: "github.com/gogo/protobuf/protoc-gen-gofast@latest",
|
||||
Options: []string{
|
||||
"--gofast_out=.",
|
||||
"--gofast_out=plugins=grpc:.",
|
||||
"--gofast_opt=paths=source_relative",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue