In Go, everything is passed by value, including interfaces (empty or not).
A quick overview 
at http://goinbigdata.com/golang-pass-by-pointer-vs-pass-by-value/.

So, you cannot change the value pointed to by an interface unless you 
"unbox" it: https://play.golang.org/p/uzccweBdzV

Further reading:
to understand interfaces inner workings: 
https://research.swtch.com/interfaces, even though I think that the 
interface value is now always a pointer.


Le mardi 11 avril 2017 16:15:38 UTC+2, Th3x0d3r a écrit :
>
> It works <https://play.golang.org/p/ATznLzPR7L>this way, but need to use 
> the GetMessage interface value 
>

-- 
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.

Reply via email to