Skip to content

Commit

Permalink
fix : noneprefixer did not return correct fixed len (#304)
Browse files Browse the repository at this point in the history
* fix : noneprefixer did not return correct fixed len

* Revert "fix : noneprefixer did not return correct fixed len"

This reverts commit 69ff604.

* fix: text

(cherry picked from commit 69ff604)

---------

Co-authored-by: Lyes <[email protected]>
  • Loading branch information
T-eli and Lyes authored Jan 16, 2024
1 parent 27feb74 commit e656fa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion field/numeric.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (f *Numeric) Marshal(v any) error {
}
f.value = val
default:
return fmt.Errorf("data does not match require *Numeric or (int, *int, string, *string) type")
return fmt.Errorf("data does not match require *Numeric or (int64, *int64, string, *string) type")
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion field/numeric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestNumericFieldMarshal(t *testing.T) {

err = numericField.Marshal([]byte("123456"))
require.Error(t, err)
require.Equal(t, "data does not match require *Numeric or (int, *int, string, *string) type", err.Error())
require.Equal(t, "data does not match require *Numeric or (int64, *int64, string, *string) type", err.Error())
}

func TestNumericFieldWithNotANumber(t *testing.T) {
Expand Down

0 comments on commit e656fa3

Please sign in to comment.