fmt: %v
verb does not print nil values for maps or slices
#11139
Labels
Milestone
%v
verb does not print nil values for maps or slices
#11139
Steps to reproduce
Expected behavior
Actual behavior
Notes
The
nil
value inhabits pointer types, function types, interface types, channel types, map types, and slice types. For all of these types, the%v
verb should distinguish thenil
value from all other values of the type.Here is a larger program showing the inconsistent behavior of
%v
:The text was updated successfully, but these errors were encountered: