I don't know what is the reason of following compilation error. I will appreciate any help.
./router.go:190: cannot use listener (type webhooklistener.MyListener) as type webhook.Listener in field value:
webhooklistener.MyListener does not implement webhook.Listener (missing webhook.handle method)
have webhooklistener.handle()
want webhook.handle()
Client:
package webhook
type Listener interface {
handle()
}
type Client struct {
Listener Listener
}
Listener:
package webhooklistener
type MyListener struct {
}
func (ll MyListener) handle() {
}
Router:
listener := webhooklistener.MyListener{}
client := webhook.Client{listener} // COMPILATION ERROR
handle()method, it's probably not being exported for external use.