22 lines
361 B
Go
22 lines
361 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"go.wit.com/lib/protobuf/chatpb"
|
|
"go.wit.com/log"
|
|
)
|
|
|
|
func main() {
|
|
data, _ := os.ReadFile("log/sample.text")
|
|
log.Info("trying unmarshal len(data) =", len(data))
|
|
pb, err := chatpb.UnmarshalChatsTEXT(data)
|
|
if err != nil {
|
|
log.Info("Unmarshal error", err)
|
|
// log.Info(string(data))
|
|
return
|
|
}
|
|
|
|
log.Info(pb.FormatTEXT())
|
|
}
|