I have a variadic function Result func Results(messages ...Message)
that accepts an interface Message
. It works fine if I pass a single message of type Message, but if i pass a slice of message Result(slice...)
Here is the error I get:
prog.go:38: cannot use messages (type []*SampleMessage) as type []Message in argument to Results