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.
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
You find a helpful tool called shak that makes it easy to check if information people enter into your app is correct and safe.
You simply add shak to what you're building, and it's ready to use right away.
You describe what good data looks like, like ages between 0 and 120 or names that aren't empty.
You run the checks on single pieces or whole groups of information, getting clear messages about what's wrong.
It smoothly checks nested details, like addresses inside orders, with paths showing exactly where issues are.
You mix checks with conditions, like 'if it's a gift, add a message', or make your own special rules.
Your app now confidently catches bad inputs, keeps everything safe, and gives friendly error hints to users.
Star Growth
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 RepurposeSimilar repos coming soon.