From 13b66619630affbe716e04fc14e28c628372b46b Mon Sep 17 00:00:00 2001 From: Ivan Korolev Date: Tue, 25 Nov 2014 17:58:10 +0700 Subject: [PATCH] [Y/n]: yes is default --- changes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changes.go b/changes.go index 11cc4a79..e57ffcde 100644 --- a/changes.go +++ b/changes.go @@ -120,8 +120,8 @@ func printChangeList(changes []*Change, isNoPrompt bool) bool { if isNoPrompt { return true } - var input string + input := "Y" fmt.Print("Proceed with the changes? [Y/n]: ") - fmt.Scan(&input) + fmt.Scanln(&input) return strings.ToUpper(input) == "Y" }