refactor: app move review pass

This commit is contained in:
2025-09-01 07:36:13 +02:00
parent 61849a358c
commit 3b674844c8
3 changed files with 118 additions and 90 deletions

View File

@ -160,15 +160,15 @@ func MoveOverview(
}
rows := [][]string{
{"DOMAIN", domain},
{"RECIPE", app.Recipe.Name},
{"OLD SERVER", server},
{"New SERVER", newServer},
{"SECRETS", strings.Join(secrets, "\n")},
{"VOLUMES", strings.Join(volumes, "\n")},
{i18n.G("DOMAIN", domain)},
{i18n.G("RECIPE", app.Recipe.Name)},
{i18n.G("OLD SERVER", server)},
{i18n.G("NEW SERVER", newServer)},
{i18n.G("SECRETS", strings.Join(secrets, "\n"))},
{i18n.G("VOLUMES", strings.Join(volumes, "\n"))},
}
overview := formatter.CreateOverview("MOVE OVERVIEW", rows)
overview := formatter.CreateOverview(i18n.G("MOVE OVERVIEW"), rows)
fmt.Println(overview)
}
@ -179,17 +179,17 @@ func PromptProcced() error {
}
if Dry {
return fmt.Errorf("dry run")
return fmt.Error(i18n.G("dry run"))
}
response := false
prompt := &survey.Confirm{Message: "proceed?"}
prompt := &survey.Confirm{Message: i18n.G("proceed?")}
if err := survey.AskOne(prompt, &response); err != nil {
return err
}
if !response {
return errors.New("cancelled")
return errors.New(i18n.G("cancelled"))
}
return nil