Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cmp/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ import (
//
// - If the values have an Equal method of the form "(T) Equal(T) bool" or
// "(T) Equal(I) bool" where T is assignable to I, then use the result of
// x.Equal(y) even if x or y is nil. Otherwise, no such method exists and
// evaluation proceeds to the next rule.
// x.Equal(y) when both values are non-nil. If either value is nil, Equal
// reports whether both are nil without calling the method (so a nil
// receiver never panics). Otherwise, no such method exists and evaluation
// proceeds to the next rule.
//
// - Lastly, try to compare x and y based on their basic kinds.
// Simple kinds like booleans, integers, floats, complex numbers, strings,
Expand Down