z
exposes a curated set of utility functions.
Its primary goals are two-fold:
- Make the best commonly used utilities discoverable; "Ugh! What's the import for that helper again?"
- Reduce hand strain; "I can finally stop writing
func must(...)
everywhere!"
First off, it's a much better name than 'y'.
Besides that, the choice in name is supported by a few rules-of-thumb:
- A smaller package name is more ergonomic (
z.Pointer("foo")
vs.utils.Pointer("foo")
) - The last letter of the alphabet is probably definitely less likely to be shadowed by dependents
- It's memorable (and fun to say out loud while typing!)
This module has two distinct classes of utilities, each with their own purpose and threshold for acceptance.
External utilities are curated components of external packages that are re-exported by z
to make them more easily discoverable.
The bar for accepting PRs adding external utilities should be low, since the source is not maintained in z
.
Local utilities are home baked, and should consist of the most often reimplemented helpers.
The bar for accepting PRs adding local utilities should be high, since the source is maintained in z
.