Skip to content

Repository files navigation

Coverage

Basic Utils

This repository contains a collection of utility libraries implemented in Go, designed to assist in a variety of common programming tasks. Each module addresses a particular set of functions or data structures.

Minimum Go Version Requirement

To use or contribute to this project, you need to have at least Go 1.27 installed. This is due to the usage of features and packages introduced in this version.

Modules

  • uarray: Slice utilities for searching, filtering, mapping, grouping, set-like operations, safe indexing, chunking, and string conversion.
  • uasync: Async execution helpers, futures, scheduled tasks, retry helpers, and grouped task execution.
  • ucache: Cache implementations, TTL support, composite keys, multi-cache structures, and managed cleanup wrappers.
  • ucast: Bi-directional utilities to convert basic types.
  • uconst: Shared constraints and common generic contracts.
  • uctx: Small context-related helpers.
  • uerror: Error handling helpers.
  • uevent: Channel watcher helpers.
  • ufile: File-system helpers for common read/write/list workflows.
  • umap: Map utilities and multi-map implementations.
  • umath: Mathematical utilities and helpers.
  • unumber: Versatile numeric representation and denomination helpers.
  • uonce: Helpers for one-time execution semantics.
  • uopt: Optional type implementation with JSON/SQL support and functional helpers.
  • uos: Operating-system and environment variable helpers.
  • upair: Pair type helpers.
  • uqueue: FIFO, lock-free concurrent FIFO, and priority queues.
  • uref: Reference helpers.
  • uset: Set implementations and set algebra helpers.
  • usql: SQL helper types and functions.
  • usrlz: Serialization helpers.
  • usize: Byte-sized data unit constants.
  • ustr: String helpers.
  • ustream: Experimental stream-style helpers for slice processing.

Installation

Make sure you have Go installed on your machine. Then, use go get to install the package:

go get -u github.com/kordax/basic-utils/v4

Usage

You can import each module individually or import the main module and it depends on your needs. For example, to use the queue library:

go get -u github.com/kordax/basic-utils/v4/uqueue

then...

import "github.com/kordax/basic-utils/v4/uqueue"

Then, refer to the individual documentation or code comments of each module for specific usage patterns.

Static Analysis

The repository also includes a staticcheck.conf file, indicating that it might be set up to use the staticcheck tool for static code analysis. Run staticcheck in the root directory to perform a code quality check.

About

Go programming language helper utilities and syntax sugar

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages