Skip to content

Commit

Permalink
定期存档
Browse files Browse the repository at this point in the history
  • Loading branch information
peifengll committed Jan 10, 2024
1 parent 1361944 commit d87cc96
Show file tree
Hide file tree
Showing 7 changed files with 53,605 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# Binaries for programs and plugins
*.exe
*.log
*.exe~
*.dll
*.so
Expand Down
49 changes: 49 additions & 0 deletions others/data_produce_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package others

import (
"bufio"
"fmt"
"os"
"strings"
"testing"
)

func TestProduce(t *testing.T) {
kk, _ := os.Create("k.txt")

readFile, err := os.Open("tpi.log")

if err != nil {
fmt.Println(err)
}
fileScanner := bufio.NewScanner(readFile)

fileScanner.Split(bufio.ScanLines)

i := 0
for fileScanner.Scan() {
i++
//fmt.Println(i, ":", fileScanner.Text())
temp := fileScanner.Text()
split := strings.Split(temp, "->")
temp = split[1]
index := strings.Index(temp, "{")
if index > 0 {
temp = temp[index:]
}
index = strings.LastIndex(temp, "}")
if index > 0 {
temp = temp[:index+1]
}
//fmt.Println(temp)
//if i == 10 {
// break
//
//}
temp = "lpush QJCG_third_party_interface_yh " + "'" + temp + "'"

kk.WriteString(temp + "\n")
}

readFile.Close()
}
51,926 changes: 51,926 additions & 0 deletions others/k.txt

Large diffs are not rendered by default.

Loading

0 comments on commit d87cc96

Please sign in to comment.