Whilst familiarising myself with the reflect package some months ago, I
experimented with the StructTag type.
At the time, I found I could update the StructTag at runtime.
http://play.golang.org/p/9zIWP2mJgP
I now have a specific use for this, and it is working well for me, but in
looking at the docs/spec I see no mention of the longer term viability of
this approach.
Of course, I understand the limitations of 'changing' existing tag data,
but that is not my question here.
Specifically can one rely on appending ones own tag data at runtime, and if
so, what if any limitations should be observed?
experimented with the StructTag type.
At the time, I found I could update the StructTag at runtime.
http://play.golang.org/p/9zIWP2mJgP
I now have a specific use for this, and it is working well for me, but in
looking at the docs/spec I see no mention of the longer term viability of
this approach.
Of course, I understand the limitations of 'changing' existing tag data,
but that is not my question here.
Specifically can one rely on appending ones own tag data at runtime, and if
so, what if any limitations should be observed?