map is not sorted
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
Research direction
The report provides no repository file or test name; begin by reproducing the example using orderedmap.NewOrderedMap, Set, Back, and Prev. Compare the observed order with the intended ordering and determine whether the issue is in orderedmap or in the unordered source map iteration. Done means the expected ordering is explicitly established and verified by a focused regression test.
Written by the indexing model from the issue text.
Description
var rs map[string][]byte
// 排序
m := orderedmap.NewOrderedMap()
for k, _ := range rs {
fmt.Printf(" |-set-> %v\n", el.Key)
m.Set(k, rs[k])
}
// You can also use Back and Prev to iterate in reverse:
for el := m.Back(); el != nil; el = el.Prev() {
fmt.Printf(" |-get-> %v\n", el.Key)
}
----> 检索记录,前缀: auth_file_rec-001203-0100000084-
out--find more--> [auth_file_rec-001203-0100000084-%!s(int=23)]:
out--find more--> [auth_file_rec-001203-0100000084-%!s(int=24)]:
out--find more--> [auth_file_rec-001203-0100000084-%!s(int=25)]:
out--find more--> [auth_file_rec-001203-0100000084-%!s(int=26)]:
|---> auth_file_rec-001203-0100000084-%!s(int=26)
|---> auth_file_rec-001203-0100000084-%!s(int=25)
|---> auth_file_rec-001203-0100000084-%!s(int=24)
|---> auth_file_rec-001203-0100000084-%!s(int=23)
----> 检索记录,前缀: auth_file_rec-001203-0100000084-
out--find more--> [auth_file_rec-001203-0100000084-%!s(int=23)]:
out--find more--> [auth_file_rec-001203-0100000084-%!s(int=24)]:
out--find more--> [auth_file_rec-001203-0100000084-%!s(int=25)]:
out--find more--> [auth_file_rec-001203-0100000084-%!s(int=26)]:
|---> auth_file_rec-001203-0100000084-%!s(int=24)
|---> auth_file_rec-001203-0100000084-%!s(int=23)
|---> auth_file_rec-001203-0100000084-%!s(int=26)
|---> auth_file_rec-001203-0100000084-%!s(int=25)
- Dominant language
- Go
- Stars
- 1k
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from elliotchance/orderedmap
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
elliotchance/orderedmap#60 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
elliotchance/orderedmap#59 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 48/100
elliotchance/orderedmap#58 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
elliotchance/orderedmap#56 · 1 comment · 3 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
elliotchance/orderedmap#55 · 3 comments ·
All issues in elliotchance/orderedmap
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100