Skip to content

things-go/container

Repository files navigation

container

container implements containers, currently the containers are not thread-safe.

GoDoc Go.Dev reference codecov Action Status Go Report Card License Tag

  • Containers
    • Stack
      • stack use go/list.
      • quick stack use builtin slice.
    • Queue
      • queue use go/list
      • quick queue use builtin slice.
      • priority queue
    • PriorityQueue use builtin slice with container/heap
    • ArrayList use builtin slice.
    • LinkedList use go/list
    • LinkedMap use go/list and builtin map.
  • safe container
    • fifo FIFO is a thread-safe Queue. in which (a) each accumulator is simply the most recently provided object and (b) the collection of keys to process is a FIFO.

      FIFO solves this use case:

      • You want to process every object (exactly) once.
      • You want to process the most recent version of the object when you process it.
      • You do not want to process deleted objects, they should be removed from the queue.
      • You do not want to periodically reprocess objects.
  • others
    • Comparator sort and heap with Comparable
    • go
      • list
      • heap
      • ring