File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ module github.com/ralvarezdev/go-validator
33go 1.24.0
44
55require (
6- github.com/ralvarezdev/go-reflect v0.2.13
6+ github.com/ralvarezdev/go-reflect v0.3.1
77 github.com/ralvarezdev/go-strings v0.2.1
8- google.golang.org/genproto/googleapis/rpc v0.0.0-20251020155222-88f65dc88635
8+ google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda
99)
1010
1111require google.golang.org/protobuf v1.36.10 // indirect
Original file line number Diff line number Diff line change 11github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8 =
22github.com/google/go-cmp v0.7.0 /go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU =
3- github.com/ralvarezdev/go-reflect v0.2.13 h1:ExWU/O6dz4OPzdHgTrJas7uIOF5ELSLP/KjwlfncoeE =
4- github.com/ralvarezdev/go-reflect v0.2.13 /go.mod h1:CsZqMmJCXYow9l2YQIdvIe/q7aeRtlA3gq0r9dmLEN0 =
3+ github.com/ralvarezdev/go-reflect v0.3.1 h1:+u59QNddIwI0lQWhWqO5gYGKC4oR0DP50uEpLxwdS/4 =
4+ github.com/ralvarezdev/go-reflect v0.3.1 /go.mod h1:CsZqMmJCXYow9l2YQIdvIe/q7aeRtlA3gq0r9dmLEN0 =
55github.com/ralvarezdev/go-strings v0.2.1 h1:bWq0bzzGrPfCrdK5ptUT6+xTMuvvXQ0Q3fARFWV/7AY =
66github.com/ralvarezdev/go-strings v0.2.1 /go.mod h1:8sFOqmPJpqzS7bTjf91EzUCITnwpmkfifwY80GxV5r8 =
7- google.golang.org/genproto/googleapis/rpc v0.0.0-20251020155222-88f65dc88635 h1:3uycTxukehWrxH4HtPRtn1PDABTU331ViDjyqrUbaog =
8- google.golang.org/genproto/googleapis/rpc v0.0.0-20251020155222-88f65dc88635 /go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk =
7+ google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda h1:i/Q+bfisr7gq6feoJnS/DlpdwEL4ihp41fvRiM3Ork0 =
8+ google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda /go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk =
99google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE =
1010google.golang.org/protobuf v1.36.10 /go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco =
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ func (j JSONGenerator) NewMapper(structInstance any) (
7777 fieldName := structField .Name
7878
7979 // Check if the field is unexported
80- if ! goreflect .IsStructFieldExported (structField ) {
80+ if ! goreflect .IsStructFieldExported (& structField ) {
8181 // Set field as not required
8282 rootMapper .SetFieldIsRequired (fieldName , false )
8383 continue
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ func (p ProtobufGenerator) NewMapper(structInstance any) (
7676 fieldName := structField .Name
7777
7878 // Omit protobuf internal fields or just unexported fields
79- if gostringsprotobuf .IsProtobufGeneratedField (fieldName ) || ! goreflect .IsStructFieldExported (structField ) {
79+ if gostringsprotobuf .IsProtobufGeneratedField (fieldName ) || ! goreflect .IsStructFieldExported (& structField ) {
8080 // Set field as not required
8181 rootMapper .SetFieldIsRequired (fieldName , false )
8282 continue
You can’t perform that action at this time.
0 commit comments