func createMessage(t *testing.T, protoMsg *logmessage.LogMessage, sourceName *string, msgType *logmessage.LogMessage_MessageType) (msg *logmessage.Message) { protoMsg.SourceName = sourceName protoMsg.MessageType = msgType data, err := proto.Marshal(protoMsg) assert.NoError(t, err) msg, err = logmessage.ParseMessage(data) assert.NoError(t, err) return }
func createMessage(protoMsg *logmessage.LogMessage, sourceName *string, msgType *logmessage.LogMessage_MessageType) (msg *logmessage.Message) { protoMsg.SourceName = sourceName protoMsg.MessageType = msgType data, err := proto.Marshal(protoMsg) Expect(err).NotTo(HaveOccurred()) msg, err = logmessage.ParseMessage(data) Expect(err).NotTo(HaveOccurred()) return }