Weak reference in Go. Adapted/fixed code from: https://play.golang.org/p/f9HY6-z8Pp
This is just an experiment for educational purposes. You really should not be using this in your code as it depends on runtime representation of interfaces in Go, is super-unreliable, probably has bugs, and yadda yadda yadda... TL;DR Do not use this code (or use at your own risk).