Skip to content

Commit

Permalink
feat(cli): remove inital ? from wizard questions
Browse files Browse the repository at this point in the history
  • Loading branch information
moroderNumerous committed May 14, 2024
1 parent e71c27b commit 4df2929
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions cli/cmd/initialize/wizard/folder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand All @@ -70,4 +80,5 @@ func absPath(p string) (string, error) {
}

return path.Join(wd, p), nil

}

Check failure on line 84 in cli/cmd/initialize/wizard/folder.go

View workflow job for this annotation

GitHub Actions / Lint CLI

unnecessary trailing newline (whitespace)
2 changes: 1 addition & 1 deletion cli/cmd/initialize/wizard/wizard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4df2929

Please sign in to comment.