-
Notifications
You must be signed in to change notification settings - Fork 18k
reflect: document that DeepEqual distinguishes nil and empty slice #4133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
a nil slice is a SliceHeader where all fields are zero, and an empty slice is a SliceHeader where only Len and Cap fields are zero (the Data pointer is non-zero, in fact, we even allocate space for it now). I think they are definitely different (an example in C/C++: char *p = NULL; char *q = ""; ) |
This was fixed by bb1ad0db059a and 99bb8c9e067d. Owner changed to @robpike. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: