Closed alovak closed 2 years ago
@alovak it's like you can read my mind 😂
I've been wondering why we don't implement this using tags like you would for json or yaml. I'm all for this.
There's two things to consider here:
for 2 - this will not break existing integrations. We will support both ways to define fields.
Can you share more information on 1st?
Yeah for example field 44 is "Additional Response Data" ... Idea here to just be agonostic like:
AdditionalResponseData *field.String `field:"44"`
Initially we were worried how much drift there is with various vendors so we didn't want to hardcode too many names into structs. We've only used a few of the messages and haven't ran into much drift, so having struct tags seems useful.
I like this change, but would worry how much trouble we'll get into as we complete all the message specs.
Implemented in #163 and in #162
Personally, I struggle from working with structs like this:
so, I suggest using field tags to be able to use normal field names and still be able to specify field index/tag like this:
Please, let me know your thoughts!