• Emmanuel Odeke's avatar
    encoding/gob: document Encode, EncodeValue nil pointer panics · 5a9d5c37
    Emmanuel Odeke authored
    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/24740Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    Run-TryBot: Andrew Gerrand <adg@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    5a9d5c37
Name
Last commit
Last update
..
codec_test.go Loading commit data...
debug.go Loading commit data...
dec_helpers.go Loading commit data...
decgen.go Loading commit data...
decode.go Loading commit data...
decoder.go Loading commit data...
doc.go Loading commit data...
dump.go Loading commit data...
enc_helpers.go Loading commit data...
encgen.go Loading commit data...
encode.go Loading commit data...
encoder.go Loading commit data...
encoder_test.go Loading commit data...
error.go Loading commit data...
example_encdec_test.go Loading commit data...
example_interface_test.go Loading commit data...
example_test.go Loading commit data...
gobencdec_test.go Loading commit data...
timing_test.go Loading commit data...
type.go Loading commit data...
type_test.go Loading commit data...