3 ms·
"Function types in Go can also have methods." Wow, blew my mind... this has never occurred to me but, of course, why not? Not sure yet how I am going to abuse
by dualogy 14y ago
"Function types in Go can also have methods."
Wow, blew my mind... this has never occurred to me but, of course, why not?
Not sure yet how I am going to abuse that feature, but already looking forward to it.
- dsymonds 14y agoThe HandlerFunc type in net/http (http://golang.org/pkg/net/http/#HandlerFunc http://golang.org/pkg/net/http/#HandlerFunc) does this.
- zemo 14y agochannel types can have methods, too ;) http://gowithconfidence.tumblr.com/post/31426832143/stacked-channels http://gowithconfidence.tumblr.com/post/31426832143/stacked-...