From 3667578202a84913fcd43c04a95676537cbdddeb Mon Sep 17 00:00:00 2001 From: Jono Wenger <jono@elixxir.io> Date: Mon, 4 Jan 2021 09:59:52 -0800 Subject: [PATCH] Fix marshal return --- bindings/contact.go | 2 +- cmd/root.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bindings/contact.go b/bindings/contact.go index cfebb0782..e495a4309 100644 --- a/bindings/contact.go +++ b/bindings/contact.go @@ -52,7 +52,7 @@ func (c *Contact) GetFactList() *FactList { } func (c *Contact) Marshal() ([]byte, error) { - return c.c.Marshal() + return c.c.Marshal(), nil } /* FactList object*/ diff --git a/cmd/root.go b/cmd/root.go index e53afa33d..4375da347 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -219,11 +219,7 @@ func writeContact(c contact.Contact) { if outfilePath == "" { return } - cBytes, err := c.Marshal() - if err != nil { - jww.FATAL.Panicf("%+v", err) - } - err = ioutil.WriteFile(outfilePath, cBytes, 0644) + err := ioutil.WriteFile(outfilePath, c.Marshal(), 0644) if err != nil { jww.FATAL.Panicf("%+v", err) } -- GitLab