elliotchance / orderedmap

🔃 An ordered map in Go with amortized O(1) for Set, Get, Delete and Len.
MIT License
817 stars 62 forks source link

add support for replacing keys and maintaining order #37

Closed drshriveer closed 3 months ago

drshriveer commented 3 months ago

Background

We have a use case that requires being able to replace an existing key with a new key in an ordered map such that order is maintained. We currently use this library, so I figured I would contribute rather than perma-forking.

Changes

Testing


This change is Reviewable