From 05096de3687ac582bec63860b3dd384acd9149aa Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sun, 15 Jan 2017 14:43:16 -0800 Subject: [PATCH] Add Result.String --- example/dummy/dummy.go | 2 +- types/result.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/example/dummy/dummy.go b/example/dummy/dummy.go index 648ef07e..6fdf8785 100644 --- a/example/dummy/dummy.go +++ b/example/dummy/dummy.go @@ -4,10 +4,10 @@ import ( "encoding/hex" "strings" + "github.com/tendermint/abci/types" . "github.com/tendermint/go-common" "github.com/tendermint/go-merkle" "github.com/tendermint/go-wire" - "github.com/tendermint/abci/types" ) type DummyApplication struct { diff --git a/types/result.go b/types/result.go index 571c5bf8..af89058e 100644 --- a/types/result.go +++ b/types/result.go @@ -28,7 +28,11 @@ func (res Result) IsErr() bool { } func (res Result) Error() string { - return fmt.Sprintf("ABCI code:%v, data:%X, log:%v", res.Code, res.Data, res.Log) + return fmt.Sprintf("ABCI{code:%v, data:%X, log:%v}", res.Code, res.Data, res.Log) +} + +func (res Result) String() string { + return fmt.Sprintf("ABCI{code:%v, data:%X, log:%v}", res.Code, res.Data, res.Log) } func (res Result) PrependLog(log string) Result {