It is a perfectly reasonable way to test for interfaces. A single struct may satisfy a hundred interfaces which it doesn't even know about, this is actually one of the best traits of go.
I looked at this slide for a while and couldn't understand it. Could you explain the detail a bit ?
It seems like relying on dynamic type casting over a nil variable, is that correct ?
But then what would the following "if" look like ?
This is how you can make sure that a struct implements an interface. The line 'var _ scan.Writer = (*ColumnWriter)(nil)' assigns a nil pointer of the struct to a scan.Writer interface reference which would fail if ColumnWriter doesn't implement the interface. And the casting always works.