https://github.com/mitranim/gg
Essential utilities missing from the Go standard library.
https://github.com/mitranim/gg
generics go golang stdlib stdlib-extras
Last synced: 8 months ago
JSON representation
Essential utilities missing from the Go standard library.
- Host: GitHub
- URL: https://github.com/mitranim/gg
- Owner: mitranim
- License: unlicense
- Created: 2022-04-01T08:06:02.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-27T12:28:02.000Z (10 months ago)
- Last Synced: 2025-04-26T06:56:56.612Z (9 months ago)
- Topics: generics, go, golang, stdlib, stdlib-extras
- Language: Go
- Homepage: https://pkg.go.dev/github.com/mitranim/gg
- Size: 394 KB
- Stars: 25
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Overview
Essential utilities missing from the Go standard library.
Docs: https://pkg.go.dev/github.com/mitranim/gg
Some features:
* Designed for Go 1.18. Takes massive advantage of generics.
* Errors with stack traces.
* Checked math.
* Various functional programming utilities: map, filter, fold, and more.
* Various shortcuts for reflection.
* Various shortcuts for manipulating slices.
* Various shortcuts for manipulating maps.
* Various shortcuts for manipulating strings.
* Common-sense generic data types: zero optionals, true optionals, sets, indexed collections, and more.
* Various utilities for exception-style error handling, using `panic` and `recover`.
* CLI flag parsing.
* Various utilities for testing.
* Assertion shortcuts with descriptive errors and full stack traces.
* Carefully designed for compatibility with standard interfaces and interfaces commonly supported by 3rd parties.
* No over-modularization.
* No external dependencies.
Submodules:
* `gtest`: testing and assertion tools.
* `grepr`: tools for printing Go data structures as Go code.
* `gsql`: SQL tools:
* Support for scanning SQL rows into Go structs.
* Support for SQL arrays.
Current limitations:
* Not fully documented.
## License
https://unlicense.org