If "Speaker" is never used anywhere else, it can be anonymous:
(s interface { speak() })
| 31 | // If "Speaker" is never used |
| 32 | // anywhere else, it can be anonymous: |
| 33 | func command2(s interface { speak() }) { s.speak() } |
| 34 | |
| 35 | func main() { |
| 36 | command(Cat{}) |