package main import ( "fmt" ) type Person interface { Rest() } type Employee struct{} func (e Employee) Rest() { fmt.Println("Pihenés...") } /* Egy fügvény ami bármilyen Struktúrát elfogad ami implementálja a Person interfészt */ func Resting(p Person) { p.Rest() } func main() { emp := Employee{} Resting(emp) }