]> Cypherpunks repositories - gostls13.git/commit
internal/fmtsort: use cmp.Compare for value comparisons
authoraimuz <mr.imuz@gmail.com>
Fri, 17 May 2024 04:15:53 +0000 (04:15 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 20 May 2024 19:31:45 +0000 (19:31 +0000)
commitd51fc260e46a29edbd918d678554d319dd9ccd6d
treea78dad880865e8f6292c5a6edc31d71816f5356e
parent447ad32a1db8492ce8549ae27e0b72b611938253
internal/fmtsort: use cmp.Compare for value comparisons

Refactor compare function to use cmp.Compare for various types.
Remove redundant floatCompare and isNaN functions.

Change-Id: I146a7af9158538499d07daee930aad8cf89b7e8f
GitHub-Last-Rev: d98365c0444c0467d8b4213674f6cf166906e900
GitHub-Pull-Request: golang/go#67454
Reviewed-on: https://go-review.googlesource.com/c/go/+/586239
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/internal/fmtsort/sort.go
src/internal/fmtsort/sort_test.go