yashx

yashx / shak

Public

A type-safe Go validation library built on generics and higher-order functions. Uses plain Go constructs — no reflection, no struct tags — so validation rules are just functions that compose naturally with the rest of your code.

18
1
100% credibility
Found Mar 15, 2026 at 18 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Go
AI Summary

shak is a validation library for Go that lets developers define composable, type-safe rules to check data like numbers, strings, lists, maps, and structs without using reflection or tags.

How It Works

1
🔍 Discover shak

You find a helpful tool called shak that makes it easy to check if information people enter into your app is correct and safe.

2
Bring it into your project

You simply add shak to what you're building, and it's ready to use right away.

3
✍️ Set simple checks

You describe what good data looks like, like ages between 0 and 120 or names that aren't empty.

4
Check your data

You run the checks on single pieces or whole groups of information, getting clear messages about what's wrong.

5
🔗 Handle connected info

It smoothly checks nested details, like addresses inside orders, with paths showing exactly where issues are.

6
🔄 Combine and customize

You mix checks with conditions, like 'if it's a gift, add a message', or make your own special rules.

🎉 Perfect data every time

Your app now confidently catches bad inputs, keeps everything safe, and gives friendly error hints to users.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 18 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is shak?

Shak is a type-safe Go validation library built on generics and higher-order functions, letting you write rules as plain code that composes naturally—no reflection or struct tags needed. It validates primitives, strings, slices, maps, structs, pointers, time, and custom types, with options to stop at the first error or collect them all, including precise field paths like "address.street[1]". Go 1.21+ devs get structured errors and functions like Validate or RunValidation that feel like regular Go.

Why is it gaining traction?

Unlike tag-heavy libraries, shak uses normal Go constructs for rules you can And, Or, If, or Else together, with compile-time type safety and zero runtime magic. Built-in rules cover lengths, ranges, uniqueness, regex, and nested validation, plus custom ones are just funcs. The hook: validation blends into your code like shakira shaking up a routine, fast and expressive for type_safe github workflows.

Who should use this?

Backend Go devs validating API payloads, config structs, or form data in services. Suited for teams building domain logic around shakshuka-like recipes for complex nests, or shaktimat-style precise checks on slices/maps without boilerplate. Skip if you need i18n-heavy UIs.

Verdict

Early days at 18 stars and 1.0% credibility score, but solid docs, examples, and test coverage make it worth prototyping. Grab it for lightweight, composable validation in new Go projects—beats reflection bloat.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.