From 06a0ac8188c10700e9c8448bed9f4a41efb7ff63 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sun, 20 Mar 2016 17:20:41 -0700 Subject: [PATCH] Add NewError -> Result with no data --- types/result.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/result.go b/types/result.go index 48af9f392..17c272f8d 100644 --- a/types/result.go +++ b/types/result.go @@ -35,3 +35,10 @@ func NewResultOK(data []byte, log string) Result { Log: log, } } + +func NewError(code CodeType, log string) Result { + return Result{ + Code: code, + Log: log, + } +}