4 ms·
You can explicitly declare that it implements an interface: https://go.dev/play/p/VCcrSXT59w0 https://go.dev/play/p/VCcrSXT59w0
by X6S1x6Okd1st 4y ago
You can explicitly declare that it implements an interface:
https://go.dev/play/p/VCcrSXT59w0 https://go.dev/play/p/VCcrSXT59w0
- benhoyt 4y agoI think you forgot the "hasA" type on the var line. Fixed: https://go.dev/play/p/0Amm7nd1Av4 https://go.dev/play/p/0Amm7nd1Av4