Reflection and more complex type variables

It’s pretty easy to get an underlying value in reflections if it’s a simple type like string or int etc. but what if it’s more complex like sql.NullInt64 where there are calls that produce different values. I’m not sure how to get to those calls (like .Valid or .Int64) using reflections.

The closest I’ve got is returning something like “{install false}” which is still a compound value instead of just the “install”.

Perhaps someone could show me the last piece that needs to be done to get that last bit of data?

Here’s the code I was playing with:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.