3 ms·
That introduces a new named type though, i.e., the "any" in your package is different from the "any" in mine, which is not what I want. (Unless I'm mistaken he
by codeflo 13y ago
That introduces a new named type though, i.e., the "any" in your package is different from the "any" in mine, which is not what I want.
(Unless I'm mistaken here, which might very well be the case.)
- krakensden 13y agoCheck it out: http://play.golang.org/p/l9yn0PRbrd http://play.golang.org/p/l9yn0PRbrd Anyway, that's the point of go's type inference- if the object implements the necessary parts of the interface, it counts as that kind of object.