from Hacker News

Things I wish someone told me when I started with Go

by mikhaill on 10/14/15, 6:00 PM with 2 comments

  • by rtz12 on 10/14/15, 7:31 PM

    > and that carries a MAJOR limitation, because the instance of ImplementsFooer (f) inside your function is a copy of the object you called it on. That means you cannot manipulate data-members in interface-functions, even inside your own struct.

    You can, by doing it like this: https://play.golang.org/p/5yXfOf6Y_3

    EDIT: I'll just file an issue as I doubt the OP is the author.