utils

module
v0.0.0-...-c778a73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2025 License: MIT

README

Utils

A common utilities library for Go.

Overview

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.

Prerequisites

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

Installation

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

Install the Package
go get github.com/expensivepi/utils

Alternatively, include it directly in your go.mod file (use the latest release):

require github.com/expensivepi/utils v0.3.0
Clone the Repository (For Development)

If you want to contribute or modify the library, clone the repository:

git clone https://github.com/expensivepi/utils.git
cd utils

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
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
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
slugger A simple and efficient way to generate URL-friendly slugs from strings 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

Contributions

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!

Credits

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.

Contributors

Powered by coffee, code, and these legends ☕💻:

Directories

Path Synopsis
Package boolean defines boolean helpers.
Package boolean defines boolean helpers.
Package errutils provides utilities for error aggregation and handling.
Package errutils provides utilities for error aggregation and handling.
Package fake provides utilities for generating fake data.
Package fake provides utilities for generating fake data.
Package logging provides a simple logging library with support for multiple log levels, custom prefixes, colored output, and customizable output streams.
Package logging provides a simple logging library with support for multiple log levels, custom prefixes, colored output, and customizable output streams.
Package strings defines strings helpers.
Package strings defines strings helpers.
Package url defines url utilities helpers.
Package url defines url utilities helpers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL