优化 Windows 系统下按键退出代码 (#236)

This commit is contained in:
mikuru996 2022-10-04 10:51:12 +08:00 committed by GitHub
parent 32b5afaa88
commit ce15d4741a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -133,8 +133,7 @@ func endPrint() {
}
if runtime.GOOS == "windows" { // 如果是 Windows 系统,则需要按下 回车键 或 Ctrl+C 退出(避免通过双击运行时,测速完毕后直接关闭)
fmt.Printf("按下 回车键 或 Ctrl+C 退出。")
var pause int
fmt.Scanln(&pause)
fmt.Scanln()
}
}