|
@@ -118,16 +118,16 @@ func main() {
|
|
|
isCover := true
|
|
|
if ok {
|
|
|
inputReader := bufio.NewReader(os.Stdin)
|
|
|
- fmt.Printf("obs已存在该zip文件,是否覆盖【%s】?\n覆盖:【yes】,不覆盖【no】:", zipFile)
|
|
|
+ fmt.Printf("obs已存在该zip文件,是否覆盖【%s】?\n覆盖-默认:【yes】,不覆盖【no】:", zipFile)
|
|
|
input, err := inputReader.ReadString('\n')
|
|
|
if err != nil {
|
|
|
fmt.Println(err)
|
|
|
return
|
|
|
}
|
|
|
switch input {
|
|
|
- case "yes\n":
|
|
|
+ case "yes\r\n":
|
|
|
fmt.Println("上传中...")
|
|
|
- case "no\n":
|
|
|
+ case "no\r\n":
|
|
|
fmt.Println("取消上传")
|
|
|
isCover = false
|
|
|
time.Sleep(3 * time.Second)
|
|
@@ -135,7 +135,6 @@ func main() {
|
|
|
return
|
|
|
default:
|
|
|
fmt.Println("上传中...")
|
|
|
- return
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -175,20 +174,16 @@ func main() {
|
|
|
|
|
|
|
|
|
inputReader := bufio.NewReader(os.Stdin)
|
|
|
- fmt.Printf("是否发布【%s】,version【%s】?\n发布:【yes】,不发布【no】: ", appConf.Key, version)
|
|
|
+ fmt.Printf("是否发布【%s】,version【%s】?\n发布-默认:【yes】,不发布【no】: ", appConf.Key, version)
|
|
|
input, err := inputReader.ReadString('\n')
|
|
|
if err != nil {
|
|
|
fmt.Println(err)
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println("输入值:")
|
|
|
- fmt.Printf("%#v\n", input)
|
|
|
- time.Sleep(10 * time.Second)
|
|
|
-
|
|
|
switch input {
|
|
|
- case "yes\n":
|
|
|
+ case "yes\r\nn":
|
|
|
fmt.Println("发布中...")
|
|
|
- case "no\n":
|
|
|
+ case "no\r\n":
|
|
|
fmt.Println("取消发布")
|
|
|
time.Sleep(3 * time.Second)
|
|
|
return
|