FAQ
in my ambitions to understand how gob work . i have severals question .

i know that gob serialize a go type like struct map or interface(we must
register it's real type) but :

func (dec *Decoder) Decode(e interface{}) errorDecode reads the next value from the input stream and stores it in the data represented by the
empty interface value.If e is nil, the value will be discarded. Otherwise, the value underlying e must be a pointer to the correct type for the next data item received.If the input is at EOF, Decode returns io.EOF and does not modify e.

i didn't understand nothing in this documentation . what they mean by (
reads the next value from the input stream ) they are one data that we
could send it's a struct or a map but not many .what they mean by If e is
nil, the value will be discarded. please expert explain to me i'am
disasperate all day and ididn't find nothing

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Charles Haynes at Sep 23, 2015 at 5:58 am
    You can call encode multiple times on the same encoder. Similarly you can
    call decode multiple times on the same decoder.

    http://play.golang.org/p/QX7X2F2wv9

    This is true of the JSON encoder/decoder as well.

    -- Charles
    On Wed, Sep 23, 2015 at 2:18 PM, WALID BELRHALMIA wrote:

    in my ambitions to understand how gob work . i have severals question .

    i know that gob serialize a go type like struct map or interface(we must
    register it's real type) but :

    func (dec *Decoder) Decode(e interface{}) errorDecode reads the next value from the input stream and stores it in the data represented by the
    empty interface value.If e is nil, the value will be discarded. Otherwise, the value underlying e must be a pointer to the correct type for the next data item received.If the input is at EOF, Decode returns io.EOF and does not modify e.

    i didn't understand nothing in this documentation . what they mean by (
    reads the next value from the input stream ) they are one data that we
    could send it's a struct or a map but not many .what they mean by If e is
    nil, the value will be discarded. please expert explain to me i'am
    disasperate all day and ididn't find nothing

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 23, '15 at 4:18a
activeSep 23, '15 at 5:58a
posts2
users2
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase