๐งฉEmbedding WorkshopWORKSHOP
1
2
3
4
Step 1
Define an `Animal` struct with a `Name string` field and a `Speak()` method that returns `Name + " speaks"`. Embed `Animal` inside a `Dog` struct that also has a `Breed string` field. In `main`, create a Dog, call its promoted `Speak()` method, and print the result.
โ Enter (Mac) ยท Ctrl+Enter (Win/Linux)