remove empty
This commit is contained in:
@@ -31,6 +31,7 @@ func check() {
|
||||
|
||||
if len(telegram) > 0 {
|
||||
// Log.Info("telegram ", zap.String("text", telegram))
|
||||
telegram = removeEmpty(telegram) + "\n"
|
||||
RawLog.Write([]byte(telegram))
|
||||
buffer = nil
|
||||
InsertTelegram(telegram)
|
||||
@@ -38,3 +39,9 @@ func check() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func removeEmpty(s string) string {
|
||||
regex, _ := regexp.Compile("\n\n")
|
||||
s = regex.ReplaceAllString(s, "\n")
|
||||
return s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user