This question already has an answer here:
I can understand whole last line of code meaning: It provides a static (compile time) check that *DefaultHandler
satisfies the EasygateHandler
interface. But I cannot understand what's the meaning of (*DefaultHandler)(nil)
and what's the difference with (*DefaultHandler)()
type DefaultHandler struct {
log logrus.FieldLogger
svc *service.DefaultResolver
}
var _ easygate.EasygateHandler = (*DefaultHandler)(nil)
</div>