Re: [go-nuts] Re: help with reflect

2019-12-12 Thread Vasiliy Tolstov
вт, 10 дек. 2019 г. в 00:49, Dan Kortschak : > > On Mon, 2019-12-09 at 14:57 +0300, Vasiliy Tolstov wrote: > > Nevermind. I found the error > > https://paulcunningham.me/nevermind-found-answer/ > Ok, sorry, i'm try to provide answer for next time =) -- Vasiliy Tolstov, e-mail: v.tols...@selfip.r

Re: [go-nuts] Re: help with reflect

2019-12-09 Thread Dan Kortschak
On Mon, 2019-12-09 at 14:57 +0300, Vasiliy Tolstov wrote: > Nevermind. I found the error https://paulcunningham.me/nevermind-found-answer/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails f

[go-nuts] Re: help with reflect

2019-12-09 Thread Vasiliy Tolstov
Nevermind. I found the error пн, 9 дек. 2019 г. в 12:30, Vasiliy Tolstov : > > Hi! I'm stuck at reflection based struct assignment. > > example struct > type TestStruct struct { > Slice []*string > } > > func TestReflect(t *testing.T) { > s1 := "one" > s2 := "two" > s1 := "one" > s2 := "two"

[go-nuts] Re: help with reflect

2019-12-09 Thread Vasiliy Tolstov
Mainly i have bigger requirement: type TestStruct struct { Slice []*TestItem } type TestItem struct { Value1 string Value2 string } so i need to create slice via reflect in TestStruct variable, create variable for TestItem and iterate over TestItem fields and assign to it Value1 and Value2