Problem: Due to increased usage of Go and thus Go struct tags, clashes become inevitable.
Proposed Solution: Offer an IANA like registry for struct tags for publically available projects/libraries.
Background:
Go offers struct tags which are discoverable via reflection. These enjoy a wide range of use in the standard library in the JSON/XML and other encoding packages. The community welcomed them and build ORMs, further encodings, flag parsers and much more around them.
Since esp. while handling encodings and ORMs single sourcing data structures is beneficial for data structures.
Seems like a new wiki page would be sufficient, at least to start.
If IANA want to host this more power to them, I don't think this is the
sort of thing the Go team needs to be involved in.
On Mon, 14 Mar 2016, 04:06 Brad Fitzpatrick, [email protected]
wrote:
Seems like a new wiki page would be sufficient, at least to start.
—
Reply to this email directly or view it on GitHub
https://github.com/golang/go/issues/14805#issuecomment-196002226.
I'm in favor of a wiki page. If someone wants to do that, please go right ahead.
Started the wiki page here: https://github.com/golang/go/wiki/Well-known-struct-tags and feedback and contribution is very welcome.
@nightlyone nice work. Now we just need people to add all the non-standard-library stuff.
@nightlyone : Would you like help on reviewing all libraries under github and documenting them here? Is that the expectation of the issue?
@balanatarajan yes, that is certainly the idea. But your help would be very welcome!
Most helpful comment
Started the wiki page here: https://github.com/golang/go/wiki/Well-known-struct-tags and feedback and contribution is very welcome.