FAQ
This program (http://play.golang.org/p/eBd23tA4Hs) outputs:

map[orange:2]
map[apple:1 orange:2]


It seems that gob Decode does not clear the given map before dumping data into it. Is this the design?

--

Search Discussions

  • Volker Dobler at Nov 12, 2012 at 11:28 am
    Yes, this behavior is expected. Using a fresh, empty map to get only
    the decoded stuff is dead simple.

    Volker

    Am Montag, 12. November 2012 10:52:45 UTC+1 schrieb Yi Wang:
    This program (http://play.golang.org/p/eBd23tA4Hs) outputs:

    map[orange:2]
    map[apple:1 orange:2]


    It seems that gob Decode does not clear the given map before dumping data into it. Is this the design?
    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 12, '12 at 9:52a
activeNov 12, '12 at 11:28a
posts2
users2
websitegolang.org

2 users in discussion

Yi Wang: 1 post Volker Dobler: 1 post

People

Translate

site design / logo © 2021 Grokbase