moov-io / iso8583

A golang implementation to marshal and unmarshal iso8583 message.
https://moov.io
Apache License 2.0
304 stars 100 forks source link

Network Header types are public and so are New<TypeName> ? #145

Open wadearnold opened 2 years ago

wadearnold commented 2 years ago

I was wondering why the network header types are exported along with the creation of them?

Here the type is exported type Binary2Bytes struct {

And then the instantiation of it is also exported? func NewBinary2BytesHeader() *Binary2Bytes {

Any reason to have the type exported? When would I use one over the other? Does this need to be documented?

alovak commented 1 year ago

Should we move the headers to https://github.com/moov-io/iso8583-connection as it seems a more relevant place for them?

I also think we don't need a constructor here, but we also should not export Len -> len as well.

wisely11 commented 3 days ago

@alovak It looks like a good suggestion. Anybody working on it ? Also do you know how currently headers are being set ? i.e, source and destination addresses ?