Skip to content

Commit

Permalink
refactor: go lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Jun 14, 2024
1 parent cd1e34b commit 39ca244
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/ipfs/kubo/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,11 @@ func YesNoPrompt(prompt string) bool {
var s string
for i := 0; i < 3; i++ {
fmt.Printf("%s ", prompt)
fmt.Scanf("%s", &s)
_, err := fmt.Scanf("%s", &s)
if err != nil {
fmt.Printf("Invalid input: %v. Please try again.\n", err)
continue
}
switch s {
case "y", "Y":
return true
Expand Down

0 comments on commit 39ca244

Please sign in to comment.