summaryrefslogtreecommitdiff
path: root/src/encoding/gob/doc.go
Commit message (Collapse)AuthorAgeFilesLines
* encoding/gob: document Encode, EncodeValue nil pointer panicsEmmanuel Odeke2016-07-051-1/+2
| | | | | | | | | | | | | | | | | | Fixes #16258. Docs for Encode and EncodeValue do not mention that nil pointers are not permitted hence we panic, because Gobs encode values yet nil pointers have no value to encode. It moves a comment that was internal to EncodeValue to the top level to make it clearer to users what to expect when they pass in nil pointers. Supplements test TestTopLevelNilPointer. Change-Id: Ie54f609fde4b791605960e088456047eb9aa8738 Reviewed-on: https://go-review.googlesource.com/24740 Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* encoding/gob: document compatibilityRob Pike2016-04-221-0/+6
| | | | | | | | Fixes #13808. Change-Id: Ifbd5644da995a812438a405485c9e08b4503a313 Reviewed-on: https://go-review.googlesource.com/22352 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* encoding/gob: document behavior of zero-valued arrays, slices, and mapsRob Pike2015-12-071-12/+14
| | | | | | | | | | | | | | | | | | | | | The documentation was inconsistent. It said zero values were not sent, but that zero-valued elements of arrays and arrays were sent. But which rule applies if the array is all zero elements, and is therefore itself a zero value? The answer is: the array is transmitted. In principle the other choice could be made, but there would be considerable expense and complexity required to implement this behavior now, not to mention worries about changes of behavior. Therefore we just document the situation: Arrays, slices, and maps are always encoded. It would perhaps be nice to have sorted this out earlier, but it was a missed opportunity. Fixes #13378 Change-Id: I8fae345edfa707fcfa7a3e0160d87ff1ac5cc5a2 Reviewed-on: https://go-review.googlesource.com/17394 Reviewed-by: Russ Cox <rsc@golang.org>
* encoding/gob: document that zero elements of arrays and slices are sentRob Pike2015-11-241-1/+2
| | | | | | | | Fixes #13378 Change-Id: Ia78624ca1aa36ee906cef15416ea5554fa8229f2 Reviewed-on: https://go-review.googlesource.com/17201 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* encoding/gob: document allocation/merge behaviorRob Pike2015-09-171-0/+6
| | | | | | | | | | This is understood, obvious (to me), and well known but has not been clearly documented. Fixes #11117. Change-Id: Ib2b1e318924748d1eac0d735ad6286533be7fd39 Reviewed-on: https://go-review.googlesource.com/14693 Reviewed-by: Ian Lance Taylor <iant@golang.org>
* all: link to https for golang subdomains tooBrad Fitzpatrick2015-07-121-1/+1
| | | | | | | | | The previous commit (git 2ae77376) just did golang.org. This one includes golang.org subdomains like blog, play, and build. Change-Id: I4469f7b307ae2a12ea89323422044e604c5133ae Reviewed-on: https://go-review.googlesource.com/12071 Reviewed-by: Rob Pike <r@golang.org>
* encoding/gob: fix docsShenghou Ma2015-05-201-9/+9
| | | | | | | | Fixes #10908. Change-Id: I5ac4bd90204bc230610dcced47ce5b2253e5a004 Reviewed-on: https://go-review.googlesource.com/10250 Reviewed-by: Rob Pike <r@golang.org>
* build: move package sources from src/pkg to srcRuss Cox2014-09-081-0/+386
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.