Skip to content

Commit

Permalink
Merge pull request #15 from payamQorbanpour/feature/data_center_migra…
Browse files Browse the repository at this point in the history
…tion

Add function comments
  • Loading branch information
pjfa authored Nov 2, 2022
2 parents aff0ea9 + f06c5c3 commit f798c09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/paas/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ func NewCmdMigrate(in io.Reader, out, errout io.Writer) *cobra.Command {
return cmd
}

// reMigrationConfirm makes sure that user enters yes/no correctly.
func reMigrationConfirm(in io.Reader, writer io.Writer) bool {
inputExplain := "Do you want to run a new migration?[y/N]: "

Expand All @@ -179,6 +180,7 @@ func reMigrationConfirm(in io.Reader, writer io.Writer) bool {
return value == "y"
}

// confirmationValidate checks yes/no entry
func confirmationValidate(input string) (bool, error) {
if input != "y" && input != "N" {
return false, fmt.Errorf("enter a valid answer 'y' for \"yes\" or 'N' for \"no\"")
Expand Down

0 comments on commit f798c09

Please sign in to comment.