dict: 词汇更新 close #977 (#976)

* dict: 词汇更新

* dict: Validate entries for duplicates and sort order using Go

* dict: close #977

---------

Co-authored-by: mirtlecn <mirtle.cn+github@outlook.com>
This commit is contained in:
hegotit
2024-07-30 11:39:55 +08:00
committed by GitHub
parent bf863a9edb
commit eec59685c4
5 changed files with 43 additions and 52 deletions

View File

@@ -123,7 +123,7 @@ func Sort(dictPath string, _type int) {
return false
})
} else {
sort.Slice(contents, func(i, j int) bool {
sort.SliceStable(contents, func(i, j int) bool {
if contents[i].code != contents[j].code {
return contents[i].code < contents[j].code
}