From f8e1faa5d4eba0a807bc846d03e6e9ea33929d50 Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Thu, 22 Dec 2016 14:54:17 -0500 Subject: [PATCH] make output message more concise --- pkg/cmd/admin/policy/modify_roles.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/cmd/admin/policy/modify_roles.go b/pkg/cmd/admin/policy/modify_roles.go index 1de495ecc58e..1b5940cd2bc3 100644 --- a/pkg/cmd/admin/policy/modify_roles.go +++ b/pkg/cmd/admin/policy/modify_roles.go @@ -422,12 +422,11 @@ existingLoop: // prints affirmative output for role modification commands func printSuccessForCommand(role string, didAdd bool, targetName string, targets []string, isNamespaced bool, out io.Writer) { - preposition := "from" verb := "removed" - clusterScope := " cluster " + clusterScope := "cluster " allTargets := fmt.Sprintf("%q", targets) if isNamespaced { - clusterScope = " " + clusterScope = "" } if len(targets) > 1 { targetName = fmt.Sprintf("%ss", targetName) @@ -436,8 +435,7 @@ func printSuccessForCommand(role string, didAdd bool, targetName string, targets } if didAdd { verb = "added" - preposition = "to" } - fmt.Fprintf(out, "Successfully %s the %q%srole %s %s %s.\n", verb, role, clusterScope, preposition, targetName, allTargets) + fmt.Fprintf(out, "%srole %q %s: %s\n", clusterScope, role, verb, allTargets) }