Little bit confused with this code.
var _ QueryAppender = (*selectQuery)(nil)
I found this code in pg-go
repository and don't know why QueryAppender
declared that way. Please explain me what is the use cases when I should declare variables that way.
This doesn't do anything at runtime, but unless the
*selectQuery
type satisfies the interfaceQueryAppender
, compilation will fail. It's a kind of static assertion.