Ok, asked and answered. Figuring out .Addr() was a key, as was finding the
magic incantation to get a handle to a method. I'm curious if there's a
better method.
https://play.golang.org/p/49Yj9G0egRI
package main
import (
"fmt"
"reflect"
)
type FooTypeA uint8
type FooTypeB uint8
type MyStruc
4 AM UTC-8, Ayan George wrote:
>
>
> On 01/18/2018 01:28 PM, Boone Severson wrote:
> > Hi,
> >
> > I've got structs containing custom types. I'm hoping to use reflect
> > to create some fairly generic code to Validate() every field of a
> > struc
Hi,
I've got structs containing custom types. I'm hoping to use reflect
to create some fairly generic code to Validate() every field of a struct
based on its type, but I can't seem to get the code right. Is this
possible? I've set up a playground to show where I've gotten.
https://play.golang