This is also why I like interfaces in Golang (as a Haskell developer). You simply define a slice of the world you want to see and anything that fits the box can be passed.
It's just unfortunate golang interfaces dont support fields. Only methods.
Typescript fares better with its interface type
It's just unfortunate golang interfaces dont support fields. Only methods. Typescript fares better with its interface type