[go-nuts] Re: Merging Data Structures in Go

2017-08-26 Thread wwellington
Had same issue recently and worked around it using standard golang syntax below type mergeit struct { One FirstStruct Second SecondStruct } var finalmerge mergeit then simply reference using finalmerge.One = "blah blah blah" On Monday, 21 Nov

[go-nuts] Re: Merging Data Structures in Go

2016-11-21 Thread howardcshaw
What is the intended use-case for this? Depending on the purpose, you might have a look at mergo, https://github.com/imdario/mergo as it does something similar, mostly for pulling configuration settings from multiple places and combining them with defaults. For JSON maps, there is https://githu