interfejs konwertu Golang na typ betonu

type Person struct {
	firstName string
	lastName  string
}
func printIfPerson(object interface{}) {
	person, ok := object.(Person)
	if ok {
		fmt.Printf("Hello %s!\n", person.firstName)
	}
}
Frantic Finch