Skip to content

Commit

Permalink
Merge pull request #119 from razamiDev/ValidationReflectRemoval
Browse files Browse the repository at this point in the history
Removed reflect usage from validation errors and updated tests.

Breaking Change: 
1. Use atlas-gentool v12.5
2. Update app to use lyft/protoc-gen-validate version 0.0.7
3. Override github.com/golang/protobuf to version 1.2.0
  • Loading branch information
razamiDev authored Oct 12, 2018
2 parents 440f0df + e91ca3c commit 0074c27
Show file tree
Hide file tree
Showing 7 changed files with 273 additions and 230 deletions.
125 changes: 100 additions & 25 deletions Gopkg.lock

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

4 changes: 2 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
name = "github.com/grpc-ecosystem/grpc-gateway"
version = "1.4.1"

[[constraint]]
[[override]]
name = "github.com/lyft/protoc-gen-validate"
version = "0.0.5"
version = "0.0.7"

[[constraint]]
name = "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion errors/mappers/validationerrors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Example Usage:
),
errors.MapFunc(func(ctx context.Context, err error) (error, bool) {
vErr, _ := err.(validationerrors.ValidationError)
return errors.NewContainer(codes.InvalidArgument, "Custom error message for field: %v reason: %v", vErr.Field, vErr.Reason), true
return errors.NewContainer(codes.InvalidArgument, "Custom error message for field: %v reason: %v", vErr.Field(), vErr.Reason()), true
}),
),
}
Expand Down
Loading

0 comments on commit 0074c27

Please sign in to comment.