Skip to content

Commit

Permalink
Fix field path for uint-typed map keys (#44)
Browse files Browse the repository at this point in the history
Go's formatter prints uint-type values as a hex literal when using the
`%#v` directive in `fmt.Sprintf`, which bled over into the test cases.
This patch makes it a standard decimal literal. Updates in the libraries
will follow.
  • Loading branch information
rodaine authored Jul 5, 2023
1 parent bf89be4 commit b8db69c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func mapSuite() suites.Suite {
Message: &cases.MapRecursive{Val: map[uint32]*cases.MapRecursive_Msg{1: {}}},
Expected: results.Violations(
&validate.Violation{
FieldPath: "val[0x1].val",
FieldPath: "val[1].val",
ConstraintId: "string.min_len",
Message: "value length must be at least 3 characters",
},
Expand Down

0 comments on commit b8db69c

Please sign in to comment.