whatisgithub

What is go-argus?

kamalyes/go-argus — explained in plain English

Analysis updated 2026-05-18

27GoAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A zero dependency Go library for validating struct data with over 97 built in rules and nine language translations.

Mindmap

mindmap
  root((go-argus))
    What it does
      Struct validation
      Tag based rules
      i18n error messages
    Tech stack
      Go
      Standard library only
    Use cases
      API request validation
      Fast string checks
      Multilingual errors
    Audience
      Go developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Validate incoming API request data against rules declared directly on Go struct fields.

USE CASE 2

Get validation error messages translated into one of nine supported languages.

USE CASE 3

Validate plain strings with zero memory allocations using the faster VarString path.

USE CASE 4

Migrate an existing go-playground/validator codebase to a zero dependency alternative.

What is it built with?

Go

How does it compare?

kamalyes/go-argusaasixh/devgrepruoji6/database_scan
Stars272727
LanguageGoGoGo
Setup difficultyeasyeasyeasy
Complexity2/52/53/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires Go 1.21 or later, install with go get and no other dependencies.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

go-argus is a Go library for validating data in structs, meaning it checks that the values in your application's data meet specific rules before you process them. For example, you can declare that an email field must be a valid email address, a name must be between 2 and 50 characters, and an age must be between 0 and 150. If any rule is broken, the library returns structured error messages explaining what went wrong. You attach validation rules as tags, short labels, directly on the Go struct fields, which keeps validation definitions close to the data definition. The library then reads those tags at runtime to check the values. It covers over 97 built in rules for common formats like email addresses, URLs, IP addresses, UUIDs, credit card checksums, cryptocurrency addresses, cron expressions, and many more, plus cross field rules that compare one field against another. A performance focused feature called VarString lets you validate plain text strings without using Go's reflection system, a way programs inspect their own code at runtime that carries overhead. The VarString path validates strings directly, producing zero memory allocations for common string rules and making it roughly two to three times faster for string only checks. Rules that cannot use this fast path fall back automatically to the normal reflection based check. Error messages are built for international use from the start, with nine built in language translations covering English, Chinese, Traditional Chinese, Japanese, Korean, French, German, Spanish, and Russian, switchable with a single call, and new languages can be registered. The library also includes a lightweight JSON Schema validator and network utilities such as IP allowlists and CIDR checks. It has no third party dependencies, only Go's standard library, and is designed to be largely compatible with the popular go-playground validator library so existing code is easy to migrate. It requires Go 1.21 or later and is released under the MIT license.

Copy-paste prompts

Prompt 1
Help me install go-argus and add validation tags to my Go structs.
Prompt 2
Show me how to switch the language of go-argus's validation error messages.
Prompt 3
Explain when go-argus uses the zero-reflection VarString path versus the normal reflection path.
Prompt 4
Walk me through migrating my go-playground/validator code to go-argus.

Frequently asked questions

What is go-argus?

A zero dependency Go library for validating struct data with over 97 built in rules and nine language translations.

What language is go-argus written in?

Mainly Go. The stack also includes Go.

What license does go-argus use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is go-argus to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is go-argus for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.