Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lafriakh committed Mar 10, 2019
1 parent f8a4fc7 commit 8a6443f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions helpers/serialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,5 @@ func Serialize(src interface{}) ([]byte, error) {

// Deserialize decodes a value using gob.
func Deserialize(src []byte, dst interface{}) error {
dec := gob.NewDecoder(bytes.NewBuffer(src))
if err := dec.Decode(dst); err != nil {
return err
}
return nil
return gob.NewDecoder(bytes.NewBuffer(src)).Decode(dst)
}

0 comments on commit 8a6443f

Please sign in to comment.