Skip to content

Commit e5bbd07

Browse files
committed
调整 文字格式细节
1 parent 445ca36 commit e5bbd07

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,35 +111,35 @@ https://github.com/XIU2/CloudflareSpeedTest
111111
112112
参数:
113113
-n 200
114-
测速线程数量;越多测速越快,性能弱的设备 (如路由器) 请适当调低;(默认 200 最多 1000 )
114+
测速线程数量;越多测速越快,性能弱的设备 (如路由器) 请勿太高;(默认 200 最多 1000)
115115
-t 4
116-
延迟测速次数;单个 IP 延迟测速次数,为 1 时将过滤丢包的IP,TCP协议;(默认 4 )
116+
延迟测速次数;单个 IP 延迟测速次数,为 1 时将过滤丢包的IP,TCP协议;(默认 4)
117117
-tp 443
118-
延迟测速端口;延迟测速 TCP 协议的端口;(默认 443 )
118+
延迟测速端口;延迟测速 TCP 协议的端口;(默认 443)
119119
-dn 10
120-
下载测速数量;延迟测速并排序后,从最低延迟起下载测速的数量;(默认 10 )
120+
下载测速数量;延迟测速并排序后,从最低延迟起下载测速的数量;(默认 10)
121121
-dt 10
122-
下载测速时间;单个 IP 下载测速最长时间,单位:秒;(默认 10 )
122+
下载测速时间;单个 IP 下载测速最长时间,单位:秒;(默认 10)
123123
-url https://cf.xiu2.xyz/Github/CloudflareSpeedTest.png
124124
下载测速地址;用来下载测速的 Cloudflare CDN 文件地址,如地址含有空格请加上引号;
125125
-tl 200
126126
平均延迟上限;只输出低于指定平均延迟的 IP,可与其他上限/下限搭配;(默认 9999 ms)
127127
-tll 40
128-
平均延迟下限;只输出高于指定平均延迟的 IP,可与其他上限/下限搭配过滤被假蔷的 IP;(默认 0 ms)
128+
平均延迟下限;只输出高于指定平均延迟的 IP,可与其他上限/下限搭配过滤被假蔷的 IP;(默认 0 ms)
129129
-sl 5
130130
下载速度下限;只输出高于指定下载速度的 IP,凑够指定数量 [-dn] 才会停止测速;(默认 0.00 MB/s)
131131
-p 10
132-
显示结果数量;测速后直接显示指定数量的结果,为 0 时不显示结果直接退出;(默认 10 )
132+
显示结果数量;测速后直接显示指定数量的结果,为 0 时不显示结果直接退出;(默认 10)
133133
-f ip.txt
134-
IP段数据文件;如路径含有空格请加上引号;支持其他 CDN IP段;(默认 ip.txt )
134+
IP段数据文件;如路径含有空格请加上引号;支持其他 CDN IP段;(默认 ip.txt)
135135
-o result.csv
136-
写入结果文件;如路径含有空格请加上引号;值为空时不写入文件 [-o ""];(默认 result.csv )
136+
写入结果文件;如路径含有空格请加上引号;值为空时不写入文件 [-o ""];(默认 result.csv)
137137
-dd
138-
禁用下载测速;禁用后测速结果会按延迟排序 (默认按下载速度排序);(默认 启用 )
138+
禁用下载测速;禁用后测速结果会按延迟排序 (默认按下载速度排序);(默认 启用)
139139
-ipv6
140-
IPv6测速模式;确保 IP 段数据文件内只包含 IPv6 IP段,软件不支持同时测速 IPv4+IPv6;(默认 IPv4 )
140+
IPv6测速模式;确保 IP 段数据文件内只包含 IPv6 IP段,软件不支持同时测速 IPv4+IPv6;(默认 IPv4)
141141
-allip
142-
测速全部的IP;对 IP 段中的每个 IP (仅支持 IPv4) 进行测速;(默认 每个 IP 段随机测速一个 IP )
142+
测速全部的IP;对 IP 段中的每个 IP (仅支持 IPv4) 进行测速;(默认 每个 IP 段随机测速一个 IP)
143143
-v
144144
打印程序版本+检查版本更新
145145
-h

main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ https://github.com/XIU2/CloudflareSpeedTest
4040
-tl 200
4141
平均延迟上限;只输出低于指定平均延迟的 IP,可与其他上限/下限搭配;(默认 9999 ms)
4242
-tll 40
43-
平均延迟下限;只输出高于指定平均延迟的 IP,可与其他上限/下限搭配过滤被假蔷的 IP;(默认 0 ms)
43+
平均延迟下限;只输出高于指定平均延迟的 IP,可与其他上限/下限搭配过滤被假蔷的 IP;(默认 0 ms)
4444
-sl 5
4545
下载速度下限;只输出高于指定下载速度的 IP,凑够指定数量 [-dn] 才会停止测速;(默认 0.00 MB/s)
4646
-p 10
@@ -81,7 +81,7 @@ https://github.com/XIU2/CloudflareSpeedTest
8181
flag.Parse()
8282

8383
if task.MinSpeed > 0 && time.Duration(maxDelay)*time.Millisecond == utils.InputMaxDelay {
84-
fmt.Println("[警告] '-sl' 参数建议和 '-tl' 参数一起使用")
84+
fmt.Println("[小提示] 在使用 [-sl] 参数时,建议搭配 [-tl] 参数,以避免因凑不够 [-dn] 数量而一直测速...")
8585
}
8686
utils.InputMaxDelay = time.Duration(maxDelay) * time.Millisecond
8787
utils.InputMinDelay = time.Duration(minDelay) * time.Millisecond
@@ -92,7 +92,7 @@ https://github.com/XIU2/CloudflareSpeedTest
9292
fmt.Println("检查版本更新中...")
9393
checkUpdate()
9494
if versionNew != "" {
95-
fmt.Println("发现新版本 [" + versionNew + "]!请前往 [https://github.com/XIU2/CloudflareSpeedTest] 更新!")
95+
fmt.Printf("*** 发现新版本 [%s]!请前往 [https://github.com/XIU2/CloudflareSpeedTest] 更新! ***", versionNew)
9696
} else {
9797
fmt.Println("当前为最新版本 [" + version + "]!")
9898
}
@@ -103,7 +103,7 @@ https://github.com/XIU2/CloudflareSpeedTest
103103
func main() {
104104
go checkUpdate() // 检查版本更新
105105

106-
fmt.Printf("# XIU2/CloudflareSpeedTest %s \n", version)
106+
fmt.Printf("# XIU2/CloudflareSpeedTest %s \n\n", version)
107107

108108
// 开始延迟测速
109109
pingData := task.NewPing().Run().FilterDelay()
@@ -123,7 +123,7 @@ func endPrint() {
123123
return
124124
}
125125
if runtime.GOOS == "windows" { // 如果是 Windows 系统,则需要按下 回车键 或 Ctrl+C 退出(避免通过双击运行时,测速完毕后直接关闭)
126-
fmt.Println("\n按下 回车键 或 Ctrl+C 退出。")
126+
fmt.Printf("\n按下 回车键 或 Ctrl+C 退出。")
127127
var pause int
128128
fmt.Scanln(&pause)
129129
}

task/tcping.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (p *Ping) Run() utils.PingDelaySet {
6666
if IPv6 { // IPv6 模式判断
6767
ipVersion = "IPv6"
6868
}
69-
fmt.Printf("开始延迟测速(模式:TCP %s,端口:%d,平均延迟上限:%vms,平均延迟下限:%vms)\n", ipVersion, TCPPort, utils.InputMaxDelay.Milliseconds(), utils.InputMinDelay.Milliseconds())
69+
fmt.Printf("开始延迟测速(模式:TCP %s,端口:%d,平均延迟上限:%v ms,平均延迟下限:%v ms)\n", ipVersion, TCPPort, utils.InputMaxDelay.Milliseconds(), utils.InputMinDelay.Milliseconds())
7070
for _, ip := range p.ips {
7171
p.wg.Add(1)
7272
p.control <- false

utils/csv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,6 @@ func (s DownloadSpeedSet) Print(ipv6 bool) {
161161
fmt.Printf(dataFormat, dateString[i][0], dateString[i][1], dateString[i][2], dateString[i][3], dateString[i][4], dateString[i][5])
162162
}
163163
if !noOutput() {
164-
fmt.Printf("\n完整测速结果已写入 %v 文件,请使用记事本/表格软件查看。\n", Output)
164+
fmt.Printf("\n完整测速结果已写入 %v 文件,可使用记事本/表格软件查看。", Output)
165165
}
166166
}

0 commit comments

Comments
 (0)