Interfaces part shows a way to check interface compatibility (fulfillment):
type NullWriter struct {}
var _ io.Writer = &NullWriter{}
Nothing wrong with above code, but for completeness sake it worth mention that we needn't allocate a new variable since any value of type *NullWriter will do, even nil:
type NullWriter struct {}
var _ io.Writer = (*NullWriter)(nil)
This explicit conversion works, because nil is typed in Go. Check this playground example.