add new line
This commit is contained in:
+1
-1
@@ -94,7 +94,7 @@ func start() {
|
||||
buffer, err := utils.ReadPort()
|
||||
if err == nil {
|
||||
if lograw && len(buffer) > 0 {
|
||||
fmt.Print(string(buffer))
|
||||
fmt.Println(buffer)
|
||||
}
|
||||
if utils.Append(buffer) {
|
||||
fmt.Println()
|
||||
|
||||
+2
-3
@@ -13,19 +13,18 @@ const (
|
||||
)
|
||||
|
||||
var buffer string
|
||||
var exp, _ = regexp.Compile(Expression)
|
||||
var RawLog *rotatelogs.RotateLogs
|
||||
|
||||
func Append(data string) bool {
|
||||
buffer = buffer + data
|
||||
buffer += data
|
||||
return check()
|
||||
}
|
||||
|
||||
func check() bool {
|
||||
teleString := buffer
|
||||
if strings.Index(teleString, EndTag) > 0 {
|
||||
exp, _ := regexp.Compile(Expression)
|
||||
telegram := exp.FindString(teleString)
|
||||
|
||||
if len(telegram) > 0 {
|
||||
// Log.Info("telegram ", zap.String("text", telegram))
|
||||
telegram = removeEmpty(telegram) + "\n\n"
|
||||
|
||||
Reference in New Issue
Block a user