Skip to content

Commit ffb63eb

Browse files
authored
Merge pull request #13 from payamQorbanpour/feature/data_center_migration
Feature/data center migration
2 parents 81f707b + 19bddff commit ffb63eb

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

pkg/paas/migration.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,14 @@ func doEvery(d time.Duration, stopChannel chan bool, f func()) {
358358
// sprintResponse displays steps of migration.
359359
func sprintResponse(response ProgressResponse, w io.Writer) error {
360360
responseStr := fmt.Sprintln("")
361+
var detail string
362+
361363
for _, s := range response.Steps {
362-
responseStr += fmt.Sprintf("\t%d-%s \t\t\t%s\t%s\n", s.Order, s.Title, strings.Title(s.State), s.Data.Detail)
364+
if response.State != Failed {
365+
detail = s.Data.Detail
366+
}
367+
368+
responseStr += fmt.Sprintf("\t%d-%s \t\t\t%s\t%s\n", s.Order, s.Title, strings.Title(s.State), detail)
363369
}
364370

365371
fmt.Fprintf(w, "%s", responseStr)
@@ -462,7 +468,7 @@ func httpGet(endpoint string) (*ProgressResponse, error) {
462468

463469
// failureOutput displays failure output.
464470
func failureOutput(message string) {
465-
fmt.Println("failed:", message)
471+
fmt.Println(redColor + "\nFAILED: " + message + resetColor)
466472
}
467473

468474
// successOutput displays success output.

0 commit comments

Comments
 (0)