As far as I know methods with pointer receivers only implement interfaces for pointers. I want to utilize the encoding.TextMarshaler
interface which must be implmented with a pointer. How can I therefore obtain a pointer using reflection.
The following does not work because as mentionend a value does not implement the interface:
v.Interface().(encoding.TextUnmarshaler)
Aucun commentaire:
Enregistrer un commentaire