diff --git a/bindings/contact.go b/bindings/contact.go index cfebb078270de5a36baa7f341e4cbbfdfb5d39a9..e495a4309da1c1c3528193961f3fa53f8a0b0a3f 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 e53afa33d5f106bb3c21548caf612c067a7823df..4375da347909af73c57ad089d43580af4fed9cbf 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) }