Awesome Go

go-snk

CategoryUtilities
SubcategoryUtilities
Stars5

Type-safe generic helpers for slices, maps, strings, errors, JSON, HTTP, and containers, organized as small independently adoptable packages

About go-snk

go-snk — the kitchen sink for clean Go projects

GitHub Tag Go Reference GitHub go.mod Go version Build Status Lint Status codecov Go report CodeQL GitHub License Contributors Mentioned in Awesome Go

go-snk is the library you pull into any Go project to clean it up and keep it clean. The name is short for kitchen sink — not because it does everything, but because it collects the small, type-safe helpers you keep reaching for across projects. No repeated loops, no one-off helpers scattered through your codebase, just consistent patterns for the things you do all the time.

Getting Started

Installation

go get github.com/SharkByteSoftware/go-snk@latest

Import only the packages you need:

package main

import "github.com/SharkByteSoftware/go-snk/slicex"
import "github.com/SharkByteSoftware/go-snk/mapx"

Documentation

PackageDescriptionDocs
slicexHelpers for filtering, mapping, searching, grouping, zipping, windowing, rotating, and numeric operations on slicesslicex.md
slicex/parallelParallel slice helpers for independent per-item workslicex.md
mapxHelpers for common map operations including partitioning, key mapping, counting by classifier, and merging mapsmapx.md
httpxLightweight helpers for HTTP requests with less boilerplatehttpx.md
httpxtestBuilder for httptest servers with canned responses, per-route handlers, and response shapinghttpxtest.md
jsonxHelpers for encoding and decoding JSON to and from readers, byte slices, and stringsjsonx.md
conditionalConcise helpers for branching and value selectionconditional.md
stringxHelpers for blank checks, fallback selection, truncation, wrapping, and padding stringsstringx.md
errorxHelpers for intentional error suppression, initialization panics, multi-target error checks, and reducing multiple errors to oneerrorx.md
containersReusable data structures including lists, sets, stacks, and queuesREADME.md
helpersGeneric utilities for pointer handling and zero value operationshelpers.md

For a full overview of the library, see docs/overview.md.

License

MIT License, see LICENSE for details

Frequently Asked Questions

What is go-snk?

go-snk is a Utilities library for the Go programming language. Type-safe generic helpers for slices, maps, strings, errors, JSON, HTTP, and containers, organized as small independently adoptable packages

How do I install go-snk?

Install go-snk with the Go module system using `go get SharkByteSoftware/go-snk`. Check the repository for the current installation instructions.

What category does go-snk belong to?

go-snk is listed under Utilities, specifically Utilities.

← Back to Utilities