Skip to content

Commit

Permalink
Merge pull request #17 from kei2100/fix-depr
Browse files Browse the repository at this point in the history
fix: use pgsgo.PGGUpperCamelCase instead of protoc-gen-go generator.CamelCase
  • Loading branch information
kei2100 committed Jul 12, 2021
2 parents 1603047 + 6177fc0 commit a21cdaf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions plugin/protoc-gen-marshal-zap/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"strings"

"github.com/golang/protobuf/protoc-gen-go/generator"
marshal_zap "github.com/kei2100/protoc-gen-marshal-zap"
pgs "github.com/lyft/protoc-gen-star"
pgsgo "github.com/lyft/protoc-gen-star/lang/go"
Expand Down Expand Up @@ -98,7 +97,7 @@ func processFields(fields []pgs.Field) ([]*protoField, error) {
}
pf.IsMask = mask

pf.Accessor = generator.CamelCase(field.Name().String())
pf.Accessor = pgsgo.PGGUpperCamelCase(field.Name()).String()
if _, ok := reservedKeywords[pf.Accessor]; ok {
pf.Accessor += "_"
}
Expand Down
4 changes: 2 additions & 2 deletions test/types/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ message OtherType2 {
string nested_string_val = 1;
string nested_secret_val = 2 [(marshal_zap.mask) = true];
}
}
}

0 comments on commit a21cdaf

Please sign in to comment.