You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Compare returns an integer comparing two times.// If a is before b, it returns -1;// if a is after b, it returns +1; if they're the same, it returns 0.funcCompare(a, b time.Time) int {
returna.Compare(b)
}
The text was updated successfully, but these errors were encountered:
We have a method
time.Time.Compare
, but we don't have a plaintime.Compare
function. The latter would be useful as an argument to functions likeslices.SortFunc
orslices.BinarySearchFunc
. I proposeThe text was updated successfully, but these errors were encountered: