My problem is that I need a pointer to an element of a list asserted as type T
:
e *list.Element
t *T
But if I want to use type assertion, I can only get a copy of e.Value
:
if instance, ok := e.Value.(T); ok {
t = &instance
}
How do I get the reference to e.Value
as a pointer to type T
?