Skip to content
#

serialize

Here are 101 public repositories matching this topic...

bmeh
bmeh commented Sep 8, 2018

I believe better examples should be provided for anyone new to this library that uses the same convention as encoding/gob.

Decoding:

var foo map[string]string
if err = gob.NewDecoder(file).Decode(&foo); err != nil {
  return err
}

Encoding:

buf := new(bytes.Buffer)
if err := gob.NewEncoder(buf).Encode(foo); err != nil {
  return err
}

Note: file is `*os

Improve this page

Add a description, image, and links to the serialize topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the serialize topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.