Skip to content

kashifkhan0771/utils

Repository files navigation

Utils

Common Utilities library for Go

Overview

Utils is a lightweight, flexible, and reusable library providing utility functions and helpers for common operations in Go applications. With packages designed for managing boolean conversions, handling context values, map operations, slice utilities, string manipulations, and struct comparison, utils enhances Go projects with optimized, clean, and practical solutions.

Prerequisites

Go: The project is written in Golang, so you'll need Go installed (preferably Go 1.23.3 or later). You can download and install Go from here.

Git: For cloning the repository.

Installation

To use utils in your project, add it as a module dependency:

Clone the Repository

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

Key Features

Utility Packages

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
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

Contributions to this project are welcome! If you would like to contribute, please feel free to open a PR.

Please read the Contribution Guide before opening any new pull request

Together, we can make Utils even better for the Go community!


Credits

The image used in this project was sourced from https://github.com/MariaLetta/free-gophers-pack.
πŸ“· Image by MariaLetta, used under Creative Commons(CCO-1.0) license..