From 3b0889cb9bb952f48c2869ff2b6274f894490164 Mon Sep 17 00:00:00 2001 From: Frederik Date: Tue, 14 May 2024 17:00:41 +0200 Subject: [PATCH] feat(cli): remove inital ? from wizard questions --- cli/cmd/initialize/wizard/folder.go | 14 ++++++++++++-- cli/cmd/initialize/wizard/wizard.go | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cli/cmd/initialize/wizard/folder.go b/cli/cmd/initialize/wizard/folder.go index 0a97b7cb..d142defc 100644 --- a/cli/cmd/initialize/wizard/folder.go +++ b/cli/cmd/initialize/wizard/folder.go @@ -32,7 +32,12 @@ func createFolderSurvey(folderPath string, in terminal.FileReader) (bool, error) Default: true, } - err := survey.AskOne(prompt, &confirm, func(options *survey.AskOptions) error { options.Stdio.In = in; return nil }) + err := survey.AskOne( + prompt, + &confirm, + func(options *survey.AskOptions) error { options.Stdio.In = in; return nil }, + survey.WithIcons(func(is *survey.IconSet) { is.Question.Text = "" }), + ) if err != nil { return false, err } @@ -51,7 +56,12 @@ func confirmFolderSurvey(folderPath string, in terminal.FileReader) (bool, error msg := fmt.Sprintf("Use the existing folder %q for your app? (default: yes)", folderPath) prompt := &survey.Confirm{Message: msg, Default: true} - err := survey.AskOne(prompt, &confirm, func(options *survey.AskOptions) error { options.Stdio.In = in; return nil }) + err := survey.AskOne( + prompt, + &confirm, + func(options *survey.AskOptions) error { options.Stdio.In = in; return nil }, + survey.WithIcons(func(is *survey.IconSet) { is.Question.Text = "" }), + ) if err != nil { return false, err } diff --git a/cli/cmd/initialize/wizard/wizard.go b/cli/cmd/initialize/wizard/wizard.go index 191d98bf..7f5cee60 100644 --- a/cli/cmd/initialize/wizard/wizard.go +++ b/cli/cmd/initialize/wizard/wizard.go @@ -27,7 +27,7 @@ func RunInitAppWizard(projectFolderPath string, a *tool.Tool) (bool, error) { } answers := fromApp(a) - if err := survey.Ask(questions, answers); err != nil { + if err := survey.Ask(questions, answers, survey.WithIcons(func(is *survey.IconSet) { is.Question.Text = "" })); err != nil { return false, err }