From ad0fc01686d5b82041bba3aa0522a416af06e716 Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Sun, 3 Nov 2024 22:54:48 -0500 Subject: [PATCH] update generate command --- generator/devtools/cmd/generate/main.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/generator/devtools/cmd/generate/main.go b/generator/devtools/cmd/generate/main.go index f849ec093..d4b3140d6 100644 --- a/generator/devtools/cmd/generate/main.go +++ b/generator/devtools/cmd/generate/main.go @@ -25,10 +25,11 @@ import ( ) var ( - input = flag.String("input", "testdata/google/cloud/secretmanager/v1/", "path to protos to generate from") - output = flag.String("out", "output", "the path to the output directory") - language = flag.String("language", "", "the generated language") - testdata = flag.String("testdata", "testdata/", "path to testdata directory") + input = flag.String("input", "testdata/google/cloud/secretmanager/v1/", "path to protos to generate from") + output = flag.String("out", "output", "the path to the output directory") + language = flag.String("language", "", "the generated language") + testdata = flag.String("testdata", "testdata/", "path to testdata directory") + serviceConfig = flag.String("service-config", "testdata/google/cloud/secretmanager/v1/secretmanager_v1.yaml", "path to service config") ) func main() { @@ -59,7 +60,7 @@ func run(language, testdata, input, output string) error { args := []string{ "-I", testdata, fmt.Sprintf("--gclient_out=%s", output), - fmt.Sprintf("--gclient_opt=language=%s", language), + fmt.Sprintf("--gclient_opt=language=%s,service-config=%s", language, *serviceConfig), } args = append(args, files...)