From 687af1f3d4c375f93cee8fe5397ad5135f8bb86c Mon Sep 17 00:00:00 2001 From: Matt Krump Date: Thu, 30 Nov 2017 10:23:01 -0600 Subject: [PATCH] Change string formatting --- pkg/watched_contracts/console_presenter.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/watched_contracts/console_presenter.go b/pkg/watched_contracts/console_presenter.go index 37f06f51..bbfd5925 100644 --- a/pkg/watched_contracts/console_presenter.go +++ b/pkg/watched_contracts/console_presenter.go @@ -48,14 +48,13 @@ func attributesString(summary *ContractSummary) string { func formatAttribute(attributeName string, summary *ContractSummary) string { var stringResult string result := summary.GetStateAttribute(attributeName) - fmt.Println(fmt.Sprintf("%s: %v (%T)", attributeName, result, result)) switch t := result.(type) { case common.Address: ca := result.(common.Address) - stringResult = fmt.Sprintf("%v", ca.Hex()) + stringResult = fmt.Sprintf("%s: %v", attributeName, ca.Hex()) default: _ = t - stringResult = fmt.Sprintf("%v", result) + stringResult = fmt.Sprintf("%s: %v", attributeName, result) } return stringResult }