Hacker News new | ask | show | jobs
by X6S1x6Okd1st 1465 days ago
You can explicitly declare that it implements an interface:

https://go.dev/play/p/VCcrSXT59w0

1 comments

I think you forgot the "hasA" type on the var line. Fixed: https://go.dev/play/p/0Amm7nd1Av4