tss/exp/funint/main.go

36 lines
273 B
Go
Raw Normal View History

2022-05-02 11:36:24 -04:00
package main
import (
"fmt"
"net"
)
type Foo interface {
Bar()
}
func bar() {
fmt.Println("bar")
}
func run(f Foo) {
f.Bar()
}
type t struct {
Bar func()
}
type t2 struct {
}
func (t t2) Bar() {
bar()
}
func main() {
run(t2{})
var d net.Dialer
d.Cancel
}