mirror of
https://github.com/SourceFellows/gobuch.git
synced 2024-10-22 22:05:35 +00:00
21 lines
211 B
Go
21 lines
211 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
type Person struct {
|
|
Name string
|
|
}
|
|
|
|
func sayHello(p interface{}) {
|
|
t, ok := p.(*Person)
|
|
fmt.Println(t)
|
|
fmt.Println(ok)
|
|
}
|
|
|
|
func main() {
|
|
|
|
p := &Person{"Kristian"}
|
|
sayHello(p)
|
|
|
|
}
|