Use a TreeMap for sorted key-value lookups in a Go service without implementing the tree yourself.
Add a PriorityQueue or CircularBuffer to a Go worker pool for bounded, ordered job processing.
Serialize a HashSet or AVLTree to JSON using the built-in JSONSerializer helpers.
Use a bidirectional map to look up values by key and keys by value in a Go application.
GoDS, short for Go Data Structures, is a Go library that implements a wide set of classic data structures and the algorithms that go with them. Data structures are the standard ways programmers organise values in memory so they can be added, looked up, ordered, or iterated over efficiently. Go's built-in language only ships slices and maps, so projects that need things like trees, sets, queues, or linked lists usually pull in a library like this one. The README groups what is provided into containers and helper functions. The containers include lists (ArrayList, SinglyLinkedList, DoublyLinkedList), sets (HashSet, TreeSet, LinkedHashSet), stacks, maps (HashMap, TreeMap, LinkedHashMap, plus bidirectional maps that let you look up by value too), trees (RedBlackTree, AVLTree, BTree, BinaryHeap), and queues (including a CircularBuffer and a PriorityQueue). Every container implements a shared Container interface with Empty, Size, Clear, Values, and String methods. Ordered containers also expose iterators (some reversible), and many support enumerable operations and JSON serialization through provided JSONSerializer and JSONDeserializer helpers. Someone would use this when they are writing Go code and need a data structure that is more specialised than slice or map without rolling it themselves, for example an AVL tree for sorted lookups, a circular buffer for a bounded queue, or a bidirectional map. The README includes code examples for each structure showing exactly which methods are available. The tech stack is Go, with no dependencies beyond the standard library, and the project is BSD 2-Clause licensed. The full README is longer than what was provided.
← emirpasic on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.