From 4c92eae3118f837a17457e1f56b03d1ba1ea549e Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 5 Sep 2020 17:47:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=BE=93=E5=87=BA=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20-o=20""=20=E6=94=B9=E4=B8=BA=20-o=20"=20"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- main.go | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4672c1c..3256a8d 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ https://github.com/XIU2/CloudflareSpeedTest -f ip.txt IP 数据文件;相对/绝对路径,如包含空格请加上引号;支持其他 CDN IP段,记得禁用下载测速;(默认 ip.txt) -o result.csv - 输出结果文件;相对/绝对路径,如包含空格请加上引号;为空时不输出结果文件( -o "" );允许其他后缀;(默认 result.csv) + 输出结果文件;相对/绝对路径,如包含空格请加上引号;为空格时不输出结果文件( -o " " );允许其他后缀;(默认 result.csv) -dd 禁用下载测速;如果带上该参数就是禁用下载测速;(默认 启用) -v @@ -77,7 +77,7 @@ https://github.com/XIU2/CloudflareSpeedTest CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 # 指定 IP数据文件,不输出结果文件,直接显示结果(-p 20 条) -CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 -p 20 -f "ip.txt" -o "" -dd +CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 -p 20 -f "ip.txt" -o " " -dd # 指定 IP数据文件 及 输出结果文件(相对路径,即当前目录下) CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 -f "ip.txt" -o "result.csv" -dd diff --git a/main.go b/main.go index f509bea..211f6bc 100644 --- a/main.go +++ b/main.go @@ -43,7 +43,7 @@ https://github.com/XIU2/CloudflareSpeedTest -f ip.txt IP 数据文件;相对/绝对路径,如包含空格请加上引号;支持其他 CDN IP段,记得禁用下载测速;(默认 ip.txt) -o result.csv - 输出结果文件;相对/绝对路径,如包含空格请加上引号;为空时不输出结果文件( -o "" );允许其他后缀;(默认 result.csv) + 输出结果文件;相对/绝对路径,如包含空格请加上引号;为空格时不输出结果文件( -o " " );允许其他后缀;(默认 result.csv) -dd 禁用下载测速;如果带上该参数就是禁用下载测速;(默认 启用) -v @@ -53,7 +53,7 @@ https://github.com/XIU2/CloudflareSpeedTest 示例: CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 - CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 -p 20 -f "ip.txt" -o "" -dd + CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 -p 20 -f "ip.txt" -o " " -dd CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 -f "ip.txt" -o "result.csv" -dd CloudflareST.exe -n 500 -t 4 -dn 20 -dt 10 -f "C:\abc\ip.txt" -o "C:\abc\result.csv" -dd` @@ -97,6 +97,9 @@ https://github.com/XIU2/CloudflareSpeedTest if ipFile == "" { ipFile = "ip.txt" } + if outputFile == " " { + outputFile = "" + } } func main() {