19 lines
310 B
Go
19 lines
310 B
Go
package main
|
|
|
|
import (
|
|
"go.wit.com/lib/protobuf/chatpb"
|
|
"go.wit.com/log"
|
|
)
|
|
|
|
func dumpEntry(entry *chatpb.ChatEntry) {
|
|
log.Printf(entry.FormatTEXT())
|
|
}
|
|
|
|
func dumpchat(chat *chatpb.Chat) {
|
|
entries := chat.GetEntries()
|
|
if len(entries) > 0 {
|
|
lastEntry := entries[len(entries)-1]
|
|
dumpEntry(lastEntry)
|
|
}
|
|
}
|