https://github.com/raykavin/gokit
https://github.com/raykavin/gokit
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/raykavin/gokit
- Owner: raykavin
- Created: 2026-04-04T20:57:27.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-05T02:00:25.000Z (2 months ago)
- Last Synced: 2026-04-05T03:22:01.975Z (2 months ago)
- Language: Go
- Size: 38.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gokit
`gokit` is a Go module for shared libraries that can be reused across different projects. The goal is to keep common building blocks in one place so teams can reduce code duplication, standardize recurring infrastructure concerns, and move faster when starting or evolving services.
At the moment, the repository provides utilities for configuration loading, HTTP requests, logging, database access, retry workflows, spreadsheet exports, terminal UX, and authenticated pREST integrations, with an emphasis on low coupling and practical reuse between applications.
## Purpose
This module exists to:
- centralize reusable code across projects
- avoid reimplementing the same utilities in multiple repositories
- provide a common base for infrastructure-related concerns
- improve maintenance, consistency, and long-term reuse across services
## Available packages
- [`config`](./config/README.md): configuration loading, validation, reload handling, and environment variable expansion
- [`database`](./database/README.md): typed `database/sql` helpers and GORM bootstrap utilities
- [`http`](./http/README.md): HTTP request helpers, shared header constants, and compressed response handling
- [`logger`](./logger/README.md): reusable structured logging built on top of `zerolog`
- [`prest`](./prest/README.md): authenticated pREST client with typed JSON decoding and token reuse
- [`retry`](./retry/README.md): context-aware retry helper with exponential backoff and caller-defined retry rules
- [`spreadsheet`](./spreadsheet/README.md): CSV and XLSX export helpers with multi-sheet support and configurable header styling
- [`terminal`](./terminal/README.md): terminal banners, headers, highlighted output, and concurrent progress rendering
## Installation
To use the module in another project:
```bash
go get github.com/raykavin/gokit
```
Then import only the packages you need in the consuming application.
## Documentation index
The root README is intentionally focused on repository-level information. Package-specific usage, examples, and API notes live next to the corresponding code:
- [`config/README.md`](./config/README.md)
- [`database/README.md`](./database/README.md)
- [`http/README.md`](./http/README.md)
- [`logger/README.md`](./logger/README.md)
- [`prest/README.md`](./prest/README.md)
- [`retry/README.md`](./retry/README.md)
- [`spreadsheet/README.md`](./spreadsheet/README.md)
- [`terminal/README.md`](./terminal/README.md)
## Reuse strategy
This repository can grow over time as new shared libraries emerge from real project needs. A good rule of thumb is to move code here when it:
- appears repeatedly across different services
- represents generic infrastructure or integration logic
- is not tightly coupled to the business rules of a single system
That way, each application can stay focused on domain logic while reusing a common foundation for recurring technical concerns.