This repository defines generic data structures in Go.
Most of the types in this module share common behaviors:
- A
Clear
method that discards all the contents of the container. - A
Peek
method that returns an order statistic of the container. - An
Each
method that iterates the container in its natural order (usable as a range function). - An
IsEmpty
method that reports whether the container is empty. - A
Len
method that reports the number of elements in the container.
- heapq a heap-structured priority queue (package docs)
- mapset a basic map-based set implementation (package docs)
- mlink basic linked sequences (list, queue) (package docs)
- omap ordered key-value map (package docs)
- queue an array-based FIFO queue (package docs)
- ring a circular doubly-linked sequence (package docs)
- stack an array-based LIFO stack (package docs)
- stree self-balancing binary-search tree (package docs)
- cache an in-memory key/value cache (package docs)
- distinct a probabilistic distinct-elements counter (CVM) (package docs)
- slice helpful functions for manipulating slices (package docs)
- mbits helpful functions for manipulating bits and bytes (package docs)
- mdiff supports creating textual diffs (package docs, example)
- mstr helpful functions for manipulating strings (package docs)
- mtest a support library for writing tests (package docs)
- shell POSIX shell quoting and splitting (package docs)
- value helpful functions for basic values and pointers (package docs)