A common utilities library for Go.
Utils is a lightweight, flexible, and reusable library that provides utility functions and helpers for common operations in Go applications. It includes packages for boolean conversions, context value handling, map operations, slice utilities, string manipulations, struct comparisons, and more—enhancing Go projects with optimized, clean, and practical solutions.
- Go: The project is written in Golang. Ensure you have Go installed (preferably Go 1.23.3 or later). You can download it here.
- Git: Required for cloning the repository.
To use Utils in your project, add it as a module dependency:
go get github.com/kashifkhan0771/utils
Alternatively, include it directly in your go.mod
file (use the latest release):
require github.com/kashifkhan0771/utils v0.3.0
If you want to contribute or modify the library, clone the repository:
git clone https://github.com/kashifkhan0771/utils.git
cd utils
Package Name | Description | Documentation | Examples |
---|---|---|---|
boolean | Utilities for boolean value checking and toggling | README | EXAMPLES |
caching | Cache management utilities | README | EXAMPLES |
ctxutils | Context utilities | README | EXAMPLES |
errutils | Error aggregation and management utilities | README | EXAMPLES |
fake | Fake data generation (UUIDs, addresses, dates) | README | EXAMPLES |
fsutils | File system utilities (size, metadata, comparison) | README | EXAMPLES |
logging | Flexible logging system for Golang | README | EXAMPLES |
maps | Utilities for state and metadata maps | README | EXAMPLES |
math | Mathematical utilities and helpers | README | EXAMPLES |
pointers | Helper functions for working with pointer values | README | EXAMPLES |
rand | Random number and string generation utilities | README | EXAMPLES |
slice | Slice manipulation and de-duplication utilities | README | EXAMPLES |
sort | Sorting algorithms | README | EXAMPLES |
strings | String manipulation and encoding utilities | README | EXAMPLES |
structs | Struct comparison utilities | README | EXAMPLES |
templates | Template rendering utilities | README | EXAMPLES |
timeutils | Time and date manipulation utilities | README | EXAMPLES |
url | URL parsing and manipulation utilities | README | EXAMPLES |
slugger | A simple and efficient way to generate URL-friendly slugs from strings | README | EXAMPLES |
Contributions are welcome! If you'd like to contribute, feel free to open a pull request.
Before submitting a PR, please review the Contribution Guide.
Together, we can make Utils even better for the Go community!
The image used in this project was sourced from https://github.com/MariaLetta/free-gophers-pack.
📷 Image by MariaLetta, used under the Creative Commons (CC0-1.0) license.