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.24 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/utilsAlternatively, include it directly in your go.mod file (use the latest release):
require github.com/kashifkhan0771/utils v0.3.0If 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 |
| browser | Utilities to open URLs in the default web browser | README | EXAMPLES |
| caching | Cache management utilities | README | EXAMPLES |
| conversion | Conversion of data types, time, and temperatures | README | EXAMPLES |
| cryptoutils | A set of cryptographic utility functions for various cryptographic operations | 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 |
| image | Utility functions for working with images | 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 |
| queue | Queue data structure | README | EXAMPLES |
| rand | Random number and string generation utilities | README | EXAMPLES |
| ratelimiter | Token-bucket rate limiter (allow/wait, adjustable capacity & refill rate) | README | EXAMPLES |
| slice | Slice manipulation and de-duplication utilities | README | EXAMPLES |
| slugger | A simple and efficient way to generate URL-friendly slugs from strings | README | EXAMPLES |
| sort | Sorting algorithms | README | EXAMPLES |
| stack | Stack data structure | 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 |
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.
Powered by coffee, code, and these legends ☕💻:
