func parseData(ss *textio.StringStream, msgCollection *logexport.MessageCollection) { var logString string for ss.ReadString(&logString) { ci, err := logparser.ParseClientInfo(logString) if err != nil { fmt.Println(err) continue } msgCollection.AddClientInfo(ci) } if !ss.IsSuccess() { panic("Read error") } }
func sendMessage(msg *logexport.MessageCollection) { err := msg.SendAll() if err != nil { fmt.Println(err) } }