From 6fc506c90022e7a70eaa6230a2ff671df667cd6c Mon Sep 17 00:00:00 2001 From: fumiama Date: Tue, 9 Aug 2022 21:29:28 +0800 Subject: [PATCH] typo --- cmd/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index c20e7f3..479d059 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -48,7 +48,7 @@ func main() { t := sc.Text() i++ if len([]rune(t)) > 100 { - panic("line " + strconv.Itoa(i) + ": too long (> 100 chars)") + panic("line " + strconv.Itoa(i+1) + ": too long (> 100 chars)") } lst = append(lst, t) } @@ -59,7 +59,7 @@ func main() { for i, t := range lst { u, err := spk.Speak(t) if err != nil { - panic("line " + strconv.Itoa(i) + " error: " + err.Error()) + panic("line " + strconv.Itoa(i+1) + " error: " + err.Error()) } lst[i] = u fmt.Print("\rread: ", (i+1)*100/len(lst), " %")