vendredi 15 septembre 2023

How do I access the underlying struct of a reflect.Value?

How do I access the underlying (opaque) struct of a reflect.Value (eg, a time.Time) from the reflection library?

So far, I've been creating a temporary time.Time, taking the ValueOf it, then using Set() to copy it out. Is there a way to access the original directly as a time.Time?





Aucun commentaire:

Enregistrer un commentaire