diff --git a/field/numeric.go b/field/numeric.go index e4ebc8e..1c0f854 100644 --- a/field/numeric.go +++ b/field/numeric.go @@ -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 (int64, *int64, string, *string) type") + return fmt.Errorf("data does not match require *Numeric or (int, *int, string, *string) type") } return nil diff --git a/field/numeric_test.go b/field/numeric_test.go index 8267925..090b039 100644 --- a/field/numeric_test.go +++ b/field/numeric_test.go @@ -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 (int64, *int64, string, *string) type", err.Error()) + require.Equal(t, "data does not match require *Numeric or (int, *int, string, *string) type", err.Error()) } func TestNumericFieldWithNotANumber(t *testing.T) { diff --git a/prefix/none.go b/prefix/none.go index df88379..0b220ec 100644 --- a/prefix/none.go +++ b/prefix/none.go @@ -12,7 +12,7 @@ func (p *nonePrefixer) EncodeLength(int, int) ([]byte, error) { } func (p *nonePrefixer) DecodeLength(fixLen int, data []byte) (int, int, error) { - return fixLen, 0, nil + return len(data), 0, nil } func (p *nonePrefixer) Inspect() string {