Original post

I currently have something like this

var iface interface{} iface = 0 value := iface.(int) value++ iface = value 

i want to do something like this (to achieve the same result)

var iface interface{} iface = 0 pvalue = &iface.UnderlayingValue *pvalue++ 

(BTW: iface cannot be a pointer, it must actually contain the value) I don’t know if this is even possible, but if anyone knows how to do something like this I would appreciate it!

submitted by /u/ajzat
[link] [comments]