The section Interface checks from Effective Go recommends
var _ json.Marshaler = (*RawMessage)(nil)
as a compile-time check that RawMessage
implements Marshaler
.
I get how the assignment does the type check but what does the right side actually mean?