From a41845ff14c66ac7928227bf61a52d85dd74beb1 Mon Sep 17 00:00:00 2001
From: Jake Taylor <jake@elixxir.io>
Date: Tue, 7 Jun 2022 11:34:46 -0500
Subject: [PATCH] cleanup round result prints

---
 cmd/root.go  |  2 +-
 cmd/utils.go | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/cmd/root.go b/cmd/root.go
index aeca80079..76935534e 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -404,7 +404,7 @@ var rootCmd = &cobra.Command{
 							// Construct the callback function which
 							// verifies successful message send or retries
 							f := func(allRoundsSucceeded, timedOut bool, rounds map[id.Round]cmix.RoundResult) {
-								printRoundResults(allRoundsSucceeded, timedOut, rounds, roundIDs, payload, recipientID)
+								printRoundResults(rounds, roundIDs, payload, recipientID)
 								if !allRoundsSucceeded {
 									retryChan <- struct{}{}
 								} else {
diff --git a/cmd/utils.go b/cmd/utils.go
index 631b47329..918ef1dc4 100644
--- a/cmd/utils.go
+++ b/cmd/utils.go
@@ -36,12 +36,10 @@ func loadBackup(backupPath, backupPass string) (backupCrypto.Backup, []byte) {
 ////////////////// Print functions /////////////////////////////
 /////////////////////////////////////////////////////////////////
 
-// Helper function which prints the round resuls
-func printRoundResults(allRoundsSucceeded, timedOut bool,
-	rounds map[id.Round]cmix.RoundResult, roundIDs []id.Round,
-	payload []byte, recipient *id.ID) {
+// Helper function which prints the round results
+func printRoundResults(rounds map[id.Round]cmix.RoundResult, roundIDs []id.Round, payload []byte, recipient *id.ID) {
 
-	// Done as string slices for easy and human readable printing
+	// Done as string slices for easy and human-readable printing
 	successfulRounds := make([]string, 0)
 	failedRounds := make([]string, 0)
 	timedOutRounds := make([]string, 0)
@@ -71,8 +69,8 @@ func printRoundResults(allRoundsSucceeded, timedOut bool,
 		jww.ERROR.Printf("\tRound(s) %v failed", strings.Join(failedRounds, ","))
 	}
 	if len(timedOutRounds) > 0 {
-		jww.ERROR.Printf("\tRound(s) %v timed "+
-			"\n\tout (no network resolution could be found)", strings.Join(timedOutRounds, ","))
+		jww.ERROR.Printf("\tRound(s) %v timed out (no network resolution could be found)",
+			strings.Join(timedOutRounds, ","))
 	}
 
 }
-- 
GitLab