Insufficient error message regarding interfaces


I started to play around with interfaces and got to a point where I have no idea what I’m actually doing wrong. Right now it would be enough for me if you have just a look at the error message that I get since it tells me what it wants is exactly what it gets! I don’t see any reason for an error. MessageContent is an interface and FieldMessage implements it.

.\MsgHandler_test.go:18: cannot use test (type "".FieldMessage) as type "".MessageContent in field value:
	"".FieldMessage does not implement "".MessageContent (missing "".messageContent method)
		have "".messageContent()
		want "".messageContent()

Compare the casing of “sirheadless”. You have confusion in your code about what the actual import path is.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.