[go-nuts] Re: Too many field tags, how to split definitions ?

2017-01-24 Thread skatkatt
Perfect. Le mardi 24 janvier 2017 14:42:57 UTC+1, Jordan Krage a écrit : > > As of Go 1.8, this should be easy. You can now convert between two > structs which differ only in tags (1.8 release notes > ), so you can have a separate > struct definition

[go-nuts] Too many field tags, how to split definitions ?

2017-01-24 Thread skatkatt
Hello, I'm looking for a way to split fields tags in multiple files. My application can work with different backends (mongodb / sql / storm) that could persist the same objects. Add json for the Rest API and the fields tags definitions start to be really ugly. type MyStruct struct { ID string