I wrote a function that takes a list of proto.Message
objects. Looking at the documentation, it seems like proto.Message
wraps protoreflect.ProtoMessage
which contains a single function, ProtoReflect() Message
. Looking at the documentation for Message
, it implements a number of other functions that return types referenced by the protoreflect
package.
It seems that attempting to create a mock proto.Message
would be a lot more work that it's worth but I don't want to go through the whole process of creating a protobuf file, compiling it and referencing it just for unit testing.
Is there another way I can create a mock proto.Message
object?