Files
moxa/_test/struct27.go

19 lines
205 B
Go

package main
import "fmt"
func (f *Foo) Boo() { fmt.Println(f.name, "Boo") }
type Foo struct {
name string
fun func(f *Foo)
}
func main() {
t := &Foo{name: "foo"}
t.Boo()
}
// Output:
// foo Boo