On Sat, Aug 24, 2019 at 5:25 AM Lee Rick <blade2i...@gmail.com> wrote: > > i want to do > type A struct{ Name string} > type B struct{Age int} > type C struct{Address string} > > a, b, c := A{}, B{},C{} > have a function > d1 := merge(a,b) //d1 like struct{Name string, Age int} > d2 := merge(a,c) //d2 like struct{Name string, Address string} > d3 := merge(b,c) //d3 like struct{Age int, Address string} > > > how to realize merge function? anyone can give me a demo
Is this the XY problem? What is the task/goal? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-U%3DrJD8%3D_adUnK0hXjHzw23DLG5XS6LKYsh0PGSYEvcoQ%40mail.gmail.com.