package main import "fmt" // TODO: define Speaker interface with Speak() string // TODO: define Dog struct and implement Speak() returning "Woof" func main() { var s Speaker = Dog{} fmt.Println(s.Speak()) }
Output
Click Run to execute, or Check to validate.
Ask questions or share tips about this tutorial
Sign in to join the discussion