> > If Event is your interface and EventImpl is your struct, what you need > is a map[string]Event, not map[string]*Event. Make sure you put > &EvenImpl{} to your slices and maps, not EventImpl{} > > Here'a what is confusing me. Yes, I can write
_mark_to_object map[string]Event and b.repo._mark_to_object[mark] = b for b a pointer to Blob, with Blob satisfying Event. This compiles without error. But what actually happens here? Is the new value a pointer to the same Blob instance that is in the main list, or does the code dereference b and put a *copy* of the blob in the map? The first behavior (reference) is what I want. -- 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.