Skip to content

affected/package:  #57101

Not planned
Not planned
@hrz123

Description

@hrz123

What version of Go are you using (go version)?

go version go1.19.3 darwin/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/houruizhe/go/bin"
GOCACHE="/Users/houruizhe/Library/Caches/go-build"
GOENV="/Users/houruizhe/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/houruizhe/go/pkg/mod"
GONOPROXY="*.byted.org,*.everphoto.cn,git.smartisan.com"
GONOSUMDB="*.byted.org,*.everphoto.cn,git.smartisan.com"
GOOS="darwin"
GOPATH="/Users/houruizhe/go"
GOPRIVATE="*.byted.org,*.everphoto.cn,git.smartisan.com"
GOPROXY="https://go-mod-proxy.byted.org|https://goproxy.cn|https://proxy.golang.org|direct"
GOROOT="/usr/local/Cellar/go/1.19.3/libexec"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.19.3/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/t3/3ck0t1213rnc8sdjm5sv6hn00000gp/T/go-build2127940362=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

image

What did you expect to see?

The last sort does not change the sequence.

What did you see instead?

It reverse the slice.

Activity

seankhliao

seankhliao commented on Dec 6, 2022

@seankhliao
Member

working as intended. the less function needs to conform to the documented properties for it to work correctly.

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

hrz123

hrz123 commented on Dec 6, 2022

@hrz123
Author

Get. I read the document and see this. I guess when both Less(i, j) and Less(j, i) are true, the elements at index i and j are not considered equal.
image

locked and limited conversation to collaborators on Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @gopherbot@seankhliao@hrz123

        Issue actions

          affected/package: · Issue #57101 · golang/go