refactor: move strings.Join to DeployOverview
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
3wc
2025-09-08 22:05:41 -04:00
parent 241dffb8cd
commit 34934cf62d
5 changed files with 18 additions and 18 deletions

View File

@ -50,9 +50,9 @@ func DeployOverview(
toDeployVersion string,
releaseNotes string,
warnMessages []string,
secrets string,
configs string,
images string,
secrets []string,
configs []string,
images []string,
) error {
deployConfig := "compose.yml"
if composeFiles, ok := app.Env["COMPOSE_FILE"]; ok {
@ -84,13 +84,13 @@ func DeployOverview(
{i18n.G("ENV VERSION"), formatter.BoldDirtyDefault(envVersion)},
{i18n.G("NEW DEPLOYMENT"), formatter.BoldDirtyDefault(toDeployVersion)},
{"", ""},
{i18n.G("IMAGES"), images},
{i18n.G("IMAGES"), strings.Join(images, "\n")},
}
if len(secrets) > 0 {
secretsRows := [][]string{
{"", ""},
{i18n.G("SECRETS"), secrets},
{i18n.G("SECRETS"), strings.Join(secrets, "\n")},
}
rows = append(rows, secretsRows...)
}
@ -98,7 +98,7 @@ func DeployOverview(
if len(configs) > 0 {
configsRows := [][]string{
{"", ""},
{i18n.G("CONFIGS"), configs},
{i18n.G("CONFIGS"), strings.Join(configs, "\n")},
}
rows = append(rows, configsRows...)
}