Pointers 如何从Go中的reflect.Value获取指针?

Pointers 如何从Go中的reflect.Value获取指针?,pointers,go,reflection,interface,Pointers,Go,Reflection,Interface,据我所知,带有指针接收器的方法只实现指针的接口。我想利用encoding.TextMarshaler接口,该接口必须用指针实现。因此,如何使用反射获取指针 以下操作不起作用,因为前面提到的值未实现接口: v.Interface().(encoding.TextUnmarshaler) 使用v..Interface()(encoding.textumarshaler)获取地址。这假设v引用了一个值

据我所知,带有指针接收器的方法只实现指针的接口。我想利用
encoding.TextMarshaler
接口,该接口必须用指针实现。因此,如何使用反射获取指针

以下操作不起作用,因为前面提到的值未实现接口:

v.Interface().(encoding.TextUnmarshaler)
使用v..Interface()(encoding.textumarshaler)获取地址。这假设v引用了一个值