refactor: readability

This commit is contained in:
decentral1se 2021-12-22 01:36:17 +01:00
parent ef4383209e
commit 3d100093dc
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 4 additions and 0 deletions

View File

@ -17,16 +17,20 @@ func PromptBumpType(tagString string) error {
minor: new features/bug fixes, backwards compatible minor: new features/bug fixes, backwards compatible
patch: bug fixes, backwards compatible patch: bug fixes, backwards compatible
`) `)
var chosenBumpType string var chosenBumpType string
prompt := &survey.Select{ prompt := &survey.Select{
Message: fmt.Sprintf("select recipe version increment type"), Message: fmt.Sprintf("select recipe version increment type"),
Options: []string{"major", "minor", "patch"}, Options: []string{"major", "minor", "patch"},
} }
if err := survey.AskOne(prompt, &chosenBumpType); err != nil { if err := survey.AskOne(prompt, &chosenBumpType); err != nil {
return err return err
} }
SetBumpType(chosenBumpType) SetBumpType(chosenBumpType)
} }
return nil return nil
} }