go-extra-lib

module
v0.0.0-...-11eb462 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2023 License: MIT

README

go-extra-lib

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.

Packages

  • clock: helper interface for providing time.
  • container:
    • bitset: An efficient implementation of a set of unsigned numbers
    • set: An unordered collection of elements (map[T]struct{})
  • encoding:
    • mcsv: CSV, but map[string]string instead of []string
  • io2: Occasionally useful io.Readers
  • iter: Generic iterators and operations on such iterators
  • resource: 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-generated
    • assert: assertions which immediately fail a test
    • check: assertions which allow a test to continue

TODO

  • container/gheap: Generic version of container/heap
  • container/glist: Generic version of container/list
  • container/gring: Generic version of container/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

License

go-extra-lib is provided under the MIT license, included in the file.

Directories

Path Synopsis
clock is a package for providing time.
clock is a package for providing time.
container
bitset
bitset contains an efficient implementation of a set of unsigned numbers.
bitset contains an efficient implementation of a set of unsigned numbers.
set
set contains an implementation of an unordered collection of elements in a `map[T]struct{}`
set contains an implementation of an unordered collection of elements in a `map[T]struct{}`
encoding
mcsv
mcsv is a wrapper around the built-in encoding/csv package, parsing [RFC 4180] CSV files into map[string]string rows.
mcsv is a wrapper around the built-in encoding/csv package, parsing [RFC 4180] CSV files into map[string]string rows.
io2 is an extension of the io module, and mostly contains occasionally useful io.Reader implementations.
io2 is an extension of the io module, and mostly contains occasionally useful io.Reader implementations.
iter is a package for operating on arbitrary collections of elements.
iter is a package for operating on arbitrary collections of elements.
resource is a package for working with external data which may be updated as the program is running.
resource is a package for working with external data which may be updated as the program is running.
slices2 is an extension of golang.org/x/exp/slices (https://pkg.go.dev/golang.org/x/exp/slices), adding a few more common slice operations, most from https://github.com/golang/go/wiki/SliceTricks.
slices2 is an extension of golang.org/x/exp/slices (https://pkg.go.dev/golang.org/x/exp/slices), adding a few more common slice operations, most from https://github.com/golang/go/wiki/SliceTricks.
testing2
assert
assert implements several helper methods for comparing elements during tests, all of which fail the test immediately.
assert implements several helper methods for comparing elements during tests, all of which fail the test immediately.
check
check implements several helper methods for comparing elements during tests, all of which allow the test to continue running.
check implements several helper methods for comparing elements during tests, all of which allow the test to continue running.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL