2
3
镜像来自 https://github.com/sammy-ette/Hilbish synced 2025-08-10 02:52:03 +00:00

fix: prompt for new input on error with ContinuePrompt

basically, dont disregard the error we get and dont return previous
input. now we try to prompt for new input without running the
previous if the function got an error
This commit is contained in:
sammyette 2021-06-11 18:26:34 -04:00
父節點 7a8df8b9f2
當前提交 419e327d95
沒有發現已知的金鑰在資料庫的簽署中
GPG Key ID: 50EE40A2809851F5

查看文件

@ -140,6 +140,7 @@ func main() {
os.Exit(0)
}
input:
for interactive {
running = false
@ -162,8 +163,10 @@ func main() {
if strings.HasSuffix(input, "\\") {
for {
input, err = ContinuePrompt(strings.TrimSuffix(input, "\\"))
if err != nil || !strings.HasSuffix(input, "\\") {
if err != nil {
goto input // continue inside nested loop
}
if !strings.HasSuffix(input, "\\") {
break
}
}