This commit is contained in:
2024-12-25 20:13:02 +01:00
parent eff6338f71
commit 0fcccf93b0
131 changed files with 20710 additions and 106 deletions

View File

@@ -47,6 +47,7 @@ pub fn (mut c UIConsole) ask_question(args QuestionArgs) !string {
description: args.description
warning: 'Min lenght of answer is: ${args.minlen}'
question: args.question
default: args.default
)
}
return choice

View File

@@ -31,7 +31,7 @@ pub fn (mut c UIConsole) ask_yesno(args YesNoArgs) !bool {
print_debug('${question} (y/n) : ')
choice := os.get_raw_line().trim(' \n').to_lower()
if choice.trim_space() == "" {
return true
return args.default
}
if choice.starts_with('y') {
return true
@@ -50,5 +50,6 @@ pub fn (mut c UIConsole) ask_yesno(args YesNoArgs) !bool {
question: args.question
warning: "Please choose 'y' or 'n', then enter."
reset: true
default: args.default
)
}