Re: [go-nuts] Get struct type , save and reconstruct empty struct later

2019-07-20 Thread Vasiliy Tolstov
сб, 20 июл. 2019 г. в 17:17, Martin Schnabel : > > If you only need any unnamed struct type you can create one with reflect > from the field information that you can write to text somewhere. > > https://godoc.org/reflect#StructOf > > These unnamed struct types however do not have any

Re: [go-nuts] Get struct type , save and reconstruct empty struct later

2019-07-20 Thread Martin Schnabel
If you only need any unnamed struct type you can create one with reflect from the field information that you can write to text somewhere. https://godoc.org/reflect#StructOf These unnamed struct types however do not have any methods and do not wrap embedded named type methods. Otherwise

Re: [go-nuts] Get struct type , save and reconstruct empty struct later

2019-07-20 Thread Vasiliy Tolstov
Thanks, something like this, but i need to store type in string or []byte in db, and based on this create new empty struct. сб, 20 июл. 2019 г., 10:55 Jan Mercl <0xj...@gmail.com>: > On Sat, Jul 20, 2019 at 9:28 AM Vasiliy Tolstov > wrote: > > > Hi. I have reflection based question. > > I need

Re: [go-nuts] Get struct type , save and reconstruct empty struct later

2019-07-20 Thread Jan Mercl
On Sat, Jul 20, 2019 at 9:28 AM Vasiliy Tolstov wrote: > Hi. I have reflection based question. > I need to store type of struct passed to func and later based on this stored > type reconstruct empty needed struct. > Does this possible ? Not sure I understood the question:

[go-nuts] Get struct type , save and reconstruct empty struct later

2019-07-20 Thread Vasiliy Tolstov
Hi. I have reflection based question. I need to store type of struct passed to func and later based on this stored type reconstruct empty needed struct. Does this possible ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from