Sobes.tech

Golang

pacchetto principale import ( "fmt" ) tipo Foo interfaccia { Foo() } tipo Bar struct { Message string } func (b Bar) Foo() { fmt.Println(b.Message) } func main() { var b *Bar var f Foo f = b if f != nil { f.Foo() } }

127
/2