blob: e4f404f5cb3f677202c735834e23ef0cf6394cd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<!--
SPDX-FileCopyrightText: 2025 Stefan Majewsky <majewsky@gmx.net>
SPDX-License-Identifier: Apache-2.0
-->
# gg (Generic Groundwork)
My personal extension of the standard library.
## List of packages
### Foundational generic types
- [columnar](./columnar/): efficient JSON marshaling of lists of objects in a columnar format
- [is](./is/): binary operations that are expressed in a curried style, e.g. `is.LessThan(b)(a) == a < b`, for use with `Option.IsSomeAnd()` etc.
- [option](./option/): an Option type with strong isolation
- [options](./options/): additional functions for type Option
### Addons for database/sql
- [gsql](./gsql/): abstraction layer for database libraries, supporting both database/sql drivers and non-standard drivers like [pgx](https://github.com/jackc/pgx)
### Addons for errors
- [errext](./errext/): composite error types
### Addons for net/http
- [assetembed](./assetembed/): HTTP handler for efficiently serving embedded assets using the cache-busting pattern
- [pathrouter](./pathrouter/): HTTP router that differentiates endpoints based on paths without any regex matching
### Addons for testing
- [assert](./assert/): assertions for use in unit tests, plus a testing harness for test assertions like the ones in this package
- [jsonmatch](./jsonmatch/): matching of encoded JSON payloads against fixed assertions
- [testcapture](./testcapture/): execute test code in a way that captures error messages and side effects without failing the overall test (e.g. to unit-test test assertions themselves)
## How to contribute
This repository accepts contributions as follows:
- For new methods and functions, feel free to submit a PR right away.
- For entirely new types, or when adding library dependencies, please send a mail or open a GitHub issue first to discuss the design.
- Generally, we dislike library dependencies in this house because every dependency means extra work managing dependency upgrades.
Before sending a patch, please ensure that `make check` does not report any problems, and run `make benchmark` to check the performance impact of your changes.
To contribute to the primary repository at <https://git.xyrillian.de/go-gg>, please use `git format-patch` in the usual manner and send patches to the maintainer's mail address (which can be found in the copyright notice headers on each file).
Alternatively, if you are still using GitHub, you can submit issues and pull requests at the mirror repository <https://github.com/majewsky/gg>.
|