On Tue, Apr 30, 2019 at 4:31 PM <mdmajid.jahan...@gmail.com> wrote:

> In the method, I can debug and see that the struct got created with map and 
> its key value pair, however when the method returns to the caller, the struct 
> is there PI and cat initialised, but the key value pairs disappear from the 
> map. Is this behavior expected?

Plase show a minimal reproducer to help others help you.

Without that just a blind shot: calling a method that mutates its
receiver but is declared on a value receiver can have surprising
effects.

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