All assignments are a copy, so there's no way to modify a slice value that is in an interface{}
Just like if this were a function argument, you will need a pointer in order to modify the value. https://play.golang.org/p/kOdXUCiT_F On Thursday, March 2, 2017 at 9:01:48 AM UTC-5, Cornel Damian wrote: > > If you look where the slice is printed you will see that the data is > missing. In the working example from me the data is there. > And even so, your example doesn't help me, what i've set there is just for > example, i my code each time i add data to the slice i must first cast it. > > On Thursday, March 2, 2017 at 3:56:58 PM UTC+2, Jan Mercl wrote: >> >> On Thu, Mar 2, 2017 at 2:46 PM <bar...@gmail.com> wrote: >> >> > Can somebody explain me why? >> >> Did you mean https://play.golang.org/p/GUVZBUQlEj ? >> >> -- >> >> -j >> > -- 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. For more options, visit https://groups.google.com/d/optout.