by anonymoushn · 2y ago · 0 comments
package main
type FooInterface interface {
Baz()
}
func bar(fizz FooInterface) {
bizz.Baz()
}
type MyFoo struct{}
func (*MyFoo) Baz() {}
func main() {
var foo FooInterface = &MyFoo{}
bar(foo)
}I would not have called it a "second implementation" myself, but that's your claim to defend, not mine.