go-extra-lib is a package with Go construct commonly used in a lot of my projects. To avoid copy-pasting I have gathered them in a single importable package.
clock
: helper interface for providing time.container
:bitset
: An efficient implementation of a set of unsigned numbersset
: An unordered collection of elements (map[T]struct{})
encoding
:mcsv
: CSV, but map[string]string instead of []string
io2
: Occasionally useful io.Readersiter
: Generic iterators and operations on such iteratorsresource
: Working with "files" which may change as the program is running.slices2
: Extension to golang.org/x/exp/slices, with more slice tricks.testing2
: Various assertions for writing tests, automatically-generatedassert
: assertions which immediately fail a testcheck
: assertions which allow a test to continue
-
container/gheap
: Generic version ofcontainer/heap
-
container/glist
: Generic version ofcontainer/list
-
container/gring
: Generic version ofcontainer/ring
-
iter/stream
: Java Stream-like wrapper on iterator operations -
maps2
: Extension to golang.org/x/exp/maps, with more operations on maps. -
matrix
: 2D matrices of numbers
go-extra-lib is provided under the MIT license, included in the file.