Skip to content

Commit a4f8b69

Browse files
committed
perf: 添加一些注释
1 parent 97895df commit a4f8b69

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

tool/main.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func main() {
14-
14+
// 0.准备文件夹
1515
_, err := os.Stat("cache")
1616
if err != nil {
1717
if errors.Is(err, os.ErrNotExist) {
@@ -26,21 +26,30 @@ func main() {
2626
log.Fatalln("Check cache dir error:", err)
2727
}
2828
}
29-
// 1.下载FE,解压
29+
3030
sg := sync.WaitGroup{}
3131
sg.Add(3)
3232
go func() {
33+
// 1.下载FE,解压
34+
log.Println("Downloading FE ......")
3335
fe.Download()
3436
fe.Extract()
3537
sg.Done()
3638
}()
3739
go func() {
38-
// 3.下载server数据,解压
40+
// 2.下载server数据,解压
41+
log.Println("Downloading server ......")
3942
server.Download()
4043
server.Extract()
4144
sg.Done()
4245
}()
43-
go patch.Download(&sg)
46+
// 3. 下载fiddler.dll
47+
go func() {
48+
log.Println("Downloading fiddler.dll ......")
49+
patch.Download(&sg)
50+
}()
51+
52+
// 等待下载与解压任务全部完成
4453
sg.Wait()
4554
// 4.patch
4655
patch.Apply()

0 commit comments

Comments
 (0)