feat(d-eyes): init

This commit is contained in:
zitn
2023-11-06 16:31:16 +08:00
parent 804617ded3
commit 270bb18b98
117 changed files with 19222 additions and 0 deletions

29
process/utils/readfile.go Normal file
View File

@@ -0,0 +1,29 @@
package utils
import (
"bufio"
"os"
"strings"
)
func ReadLindIp(fileName string) ([]string, error) {
f, err := os.Open(fileName)
if err != nil {
return nil, err
}
buf := bufio.NewScanner(f)
var result []string
for {
if !buf.Scan() {
break
}
line := buf.Text()
line = strings.TrimSpace(line)
result = append(result, line)
}
return result, nil
}