This commit is contained in:
cdle
2021-09-26 16:09:34 +08:00
parent 12abea31a8
commit f533538796
3 changed files with 62 additions and 4 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ import (
"bufio"
"os"
"regexp"
"strings"
"time"
)
@@ -25,9 +26,9 @@ func init() {
scanner := bufio.NewScanner(file)
for scanner.Scan() {
line := scanner.Text()
if regexp.MustCompile(`^set`).MatchString(line) {
if regexp.MustCompile(`^\s*set`).MatchString(line) {
Senders <- &Faker{
Message: line,
Message: strings.Trim(line, " "),
}
}
}