Open wxiaoguang opened 5 months ago
go version go1.22.1 darwin/arm64
go env
N/A
c := collate.New(language.English, collate.Numeric) r1 := c.CompareString("0", "1") r2 := c.CompareString("0.0", "1.0") println(r1, r2)
r1 == -1 and r2 == 1 (WRONG)
r1 == -1
r2 == 1 (WRONG)
r1 == -1 and r2 == -1
r2 == -1
My PR golang/text#50 should fix this as well
Go version
go version go1.22.1 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
What did you see happen?
r1 == -1
andr2 == 1 (WRONG)
What did you expect to see?
r1 == -1
andr2 == -1