Skip to content

Commit ceec043

Browse files
committed
阻止程序自动关闭
1 parent 0781a5a commit ceec043

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

main.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ import (
77
)
88

99
func main() {
10-
from := strings.ReplaceAll(os.Args[1], "\\", "/")
10+
defer func() {
11+
os.Stdin.Read(make([]byte, 1))
12+
}()
13+
14+
if len(os.Args) < 2 {
15+
fmt.Println("请查看 readme.md 使用说明")
16+
return
17+
}
18+
19+
from := os.Args[1]
20+
fmt.Println("from", from)
21+
22+
from = strings.ReplaceAll(from, "\\", "/")
1123
fromParts := strings.Split(from, "/")
1224
wxid := fromParts[len(fromParts)-3]
1325

0 commit comments

Comments
 (0)