• Gustavo Niemeyer's avatar
    exp/template: don't panic on range of nil interface · e3f3a541
    Gustavo Niemeyer authored
    This avoids a non-obvious panic when range is used on a
    nil interface, and fixes it by behaving as if the range
    was empty.
    
    The new behavior is equivalent to the outcome of iterating
    on a nil map or slice, and is useful because it allows
    generic structures such as used in json (map[string]interface{})
    to behave correctly if a key generally set to a list or map
    isn't present.
    
    R=golang-dev, r, gustavo
    CC=golang-dev
    https://golang.org/cl/4876046
    e3f3a541
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.ccmd Loading commit data...
Make.clib Loading commit data...
Make.cmd Loading commit data...
Make.common Loading commit data...
Make.inc Loading commit data...
Make.pkg Loading commit data...
all-qemu.bash Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
env.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...
version.bash Loading commit data...