Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
WineChord committed Oct 20, 2023
1 parent 3ff177e commit 95f6893
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/create/cmdflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func AddCreateFlags(createCmd *cobra.Command) {
createCmd.Flags().Bool("secvenabled", false,
"Enable generation of validate.go file using protoc-gen-secv, defaults to false")
createCmd.Flags().Bool("validate", false,
"Enable generation of validate.go file using protoc-gen-validate, defaults to false")
"Enable generation of validate.pb.go file using protoc-gen-validate, defaults to false")
createCmd.Flags().String("kvfile", "",
"Provide a json file path to unmarshal into key-value pairs (KVs) for usage in template files")
createCmd.Flags().String("kvrawjson", "",
Expand Down
2 changes: 1 addition & 1 deletion cmd/create/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (g *genDependencyRPCStubParam) genDependencyRPCStubPB() error {
searchPath, g.fname, g.option.Language, g.outputDir,
append(opts, pb.WithSecvEnabled(true))...,
); err != nil {
return fmt.Errorf("generate validation file for %s err: %w", g.fname, err)
return fmt.Errorf("generate secv file for %s err: %w", g.fname, err)
}
}
// Run protoc-gen-validate.
Expand Down
2 changes: 1 addition & 1 deletion util/pb/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func WithSecvEnabled(enabled bool) Option {
// https://github.com/bufbuild/protoc-gen-validate/tree/v1.0.2
func WithValidateEnabled(enabled bool) Option {
return func(o *options) {
o.secvEnabled = enabled
o.validationEnabled = enabled
}
}

Expand Down

0 comments on commit 95f6893

Please sign in to comment.