Utility library for Go projects.
| Package |
Import |
Description |
lc |
github.com/defany/goblin/lc |
Application lifecycle manager (graceful startup & shutdown) |
inject |
github.com/defany/goblin/inject |
Lazy per-call-site dependency initialization |
retry |
github.com/defany/goblin/retry |
Retry with exponential backoff and jitter |
cond |
github.com/defany/goblin/cond |
Ternary operator |
| Package |
Import |
Description |
pg |
github.com/defany/goblin/pg |
PostgreSQL client (pgx pool, middleware, tx-aware queries) |
pg/tx |
github.com/defany/goblin/pg/tx |
PostgreSQL adapter for transaction manager |
pg/migrate |
github.com/defany/goblin/pg/migrate |
Database migrations via goose |
tx |
github.com/defany/goblin/tx |
Database-agnostic transaction manager with retry |
river |
github.com/defany/goblin/river |
River job queue repository |
| Package |
Import |
Description |
slogx |
github.com/defany/goblin/slogx |
slog handler factories (JSON, Text, Pretty), ErrAttr, noop logger |
errfmt |
github.com/defany/goblin/errfmt |
Error wrapping with caller source info |
rt |
github.com/defany/goblin/rt |
Runtime utilities (caller name, file, unique key) |
Go 1.26+