From c96fa7c3470cd14642a4de06a51de78ddba6d746 Mon Sep 17 00:00:00 2001 From: Phani Teja Marupaka Date: Tue, 6 Oct 2020 14:41:14 -0700 Subject: [PATCH] Improve setter output message --- cmd/config/internal/commands/cmdset.go | 2 +- cmd/config/internal/commands/cmdset_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/config/internal/commands/cmdset.go b/cmd/config/internal/commands/cmdset.go index 5a29acdec..bc509410d 100644 --- a/cmd/config/internal/commands/cmdset.go +++ b/cmd/config/internal/commands/cmdset.go @@ -173,7 +173,7 @@ func (r *SetRunner) executeCmd(w io.Writer, pkgPath string) error { fmt.Fprintf(w, "%s\n", err.Error()) } } else { - fmt.Fprintf(w, "set %d field(s)\n", count) + fmt.Fprintf(w, "set %d field(s) of setter %q to value %q\n", count, r.Set.Name, r.Set.Value) } return nil } diff --git a/cmd/config/internal/commands/cmdset_test.go b/cmd/config/internal/commands/cmdset_test.go index ca4cb39e2..393f5e5d5 100644 --- a/cmd/config/internal/commands/cmdset_test.go +++ b/cmd/config/internal/commands/cmdset_test.go @@ -1094,13 +1094,13 @@ func TestSetSubPackages(t *testing.T) { dataset: "dataset-with-setters", args: []string{"namespace", "otherspace", "-R"}, expected: `${baseDir}/mysql/ -set 1 field(s) +set 1 field(s) of setter "namespace" to value "otherspace" ${baseDir}/mysql/nosetters/ setter "namespace" is not found ${baseDir}/mysql/storage/ -set 1 field(s) +set 1 field(s) of setter "namespace" to value "otherspace" `, }, { @@ -1109,7 +1109,7 @@ set 1 field(s) packagePath: "mysql", args: []string{"namespace", "otherspace"}, expected: `${baseDir}/mysql/ -set 1 field(s) +set 1 field(s) of setter "namespace" to value "otherspace" `, }, { @@ -1118,7 +1118,7 @@ set 1 field(s) packagePath: "mysql/storage", args: []string{"namespace", "otherspace"}, expected: `${baseDir}/mysql/storage/ -set 1 field(s) +set 1 field(s) of setter "namespace" to value "otherspace" `, }, }