util

module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT

README

util

A golang utility library that aims to add useful features to the std lib.

Documentation

This package contains many sub-packages that each deserve more space than can be given in one combined README. Please refer to each packages README for information about each sub-package:

  1. Iterator framework
  2. Containers (a.k.a. data structures)
  3. CLI argument parser
  4. Widgets
  5. Generators

Code Generator Installation

If your project would benefit from using the code generators defined in this utility library then you can install them using the command shown below. The generator executables will be placed in the $GOPATH/bin directory.

go install github.com/barbell-math/util/generators/...

To install a single generator rather than all of the use the command shown below.

go install github.com/barbell-math/util/generators/<generator name>

Package Install

If your project would benefit from using the this package directly as a library then you can use the command shown below to add the library to your project.

go get github.com/barbell-math/util

Helpful Commands

Building and Running Generators
go build -o ./bin/ ./generators/...
go generate ./src/...
Running Unit Tests
go build -o ./bin/ ./generators/...     # unnecessary if no generated code changed
go generate ./src/...                   # unnecessary if no generated code changed
go test ./src/...

Directories

Path Synopsis
generators
clean
A generator program that recursively removes all generated code files in the current directory.
A generator program that recursively removes all generated code files in the current directory.
containerInterfaceTests
This is a generator program that is used internally by the container/containers package to generate unit tests for containers.
This is a generator program that is used internally by the container/containers package to generate unit tests for containers.
enum
A generator program that creates methods surrounding a enum type.
A generator program that creates methods surrounding a enum type.
flags
A generator program that creates methods surrounding a bit-flag enum type.
A generator program that creates methods surrounding a bit-flag enum type.
passThroughWidget
This is a generator program that is used to create pass through widgets.
This is a generator program that is used to create pass through widgets.
structBaseWidget
A generator program that creates methods for a given struct that implement the [widgets.BaseInterface].
A generator program that creates methods for a given struct that implement the [widgets.BaseInterface].
structDefaultInit
A generator program that provides boiler plate code for struct initialization and basic methods.
A generator program that provides boiler plate code for struct initialization and basic methods.
widgetInterfaceImpl
This is a generator program that is used internally by the widgets package to generate the widgets for the builtin types.
This is a generator program that is used internally by the widgets package to generate the widgets for the builtin types.
src
container/basic
This package holds the concrete implementation of several simple data structures that can be used from any package.
This package holds the concrete implementation of several simple data structures that can be used from any package.
container/containerTypes
This package serves to define the set of types that the containers will implement.
This package serves to define the set of types that the containers will implement.
container/containers
This package holds the concrete implementations of the containers.
This package holds the concrete implementations of the containers.
container/dynamicContainers
This package serves to define the set of dynamic containers and expose them as interfaces.
This package serves to define the set of dynamic containers and expose them as interfaces.
container/staticContainers
This package serves to define the set of static containers and expose them as interfaces.
This package serves to define the set of static containers and expose them as interfaces.
container/tests
Implmenents all the tests that verify the containers in the [container] package properly implmenent the interfaces defined in the dynamicContainers and staticContainers packages.
Implmenents all the tests that verify the containers in the [container] package properly implmenent the interfaces defined in the dynamicContainers and staticContainers packages.
csv
This package implements a csv parser that extends the one supplied by the std lib to include marshalling and un-marshaling to struct values.
This package implements a csv parser that extends the one supplied by the std lib to include marshalling and un-marshaling to struct values.
customerr
This package defines several functions that help when working with errors.
This package defines several functions that help when working with errors.
hash
This package defines a non-cryptographically secure hash type that is aimed towards being used for applications like hash maps.
This package defines a non-cryptographically secure hash type that is aimed towards being used for applications like hash maps.
iter
This package defines an iterator framework comprized of lazily evaluated, pull style iterators.
This package defines an iterator framework comprized of lazily evaluated, pull style iterators.
log
This package defines a logger writer and reader that is capible of logging arbitrary values.
This package defines a logger writer and reader that is capible of logging arbitrary values.
reflect
This package defines many helper functions that make it easier to get values from the standard libraries reflect package.
This package defines many helper functions that make it easier to get values from the standard libraries reflect package.
test
This is a package that defines helper functions for writing unit tests.
This is a package that defines helper functions for writing unit tests.
widgets
This package defines several widget types that allow logic for certian common operations to be passed arround as state.
This package defines several widget types that allow logic for certian common operations to be passed arround as state.

Jump to

Keyboard shortcuts

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