Closed alovak closed 9 months ago
We want to support Go's native types such as string, int, etc. when we set data to the field using Marshal method
string
int
Marshal
So, the idea is to implement the following:
f := field.NewString(someSpec) err := f.Marshal("hello") f.Value() // "hello" err := f.Marshal(5) f.Value() // "5" str := "hello" err := f.Marshal(&str) f.Value() // "hello" i := 5 err := f.Marshal(&i) f.Value() // "5"
We want to be able to use:
*int
*string
field.Numeric
field.String
[]byte
field.Binary
field.Hex
Reference implementation is in this PR: https://github.com/moov-io/iso8583/pull/273/files
closed by #289
We want to support Go's native types such as
string
,int
, etc. when we set data to the field usingMarshal
methodSo, the idea is to implement the following:
We want to be able to use:
int
,*int
,string
,*string
forfield.Numeric
,field.String
[]byte
,string
forfield.Binary
,field.Hex
(string
should be hex and if we fail to decode it, return error)Reference implementation is in this PR: https://github.com/moov-io/iso8583/pull/273/files