Idiomatic Go Libraries for Web Development
By Qiang Xue, creator of Yii Framework
| Library | Purpose | Version | Stars | Issues | PRs | |
|---|---|---|---|---|---|---|
| Data Validation | ||||||
| ✅ | ozzo-validation | Configurable validation using code, not struct tags | ||||
| HTTP Routing | ||||||
| 🌐 | ozzo-routing | Fast HTTP router with regex matching and RESTful API support | ||||
| Database | ||||||
| 🗄️ | ozzo-dbx | DB-agnostic query builder enhancing database/sql | ||||
| Infrastructure | ||||||
| 📝 | ozzo-log | High-performance async logging with severity filtering | — | |||
| ⚙️ | ozzo-config | Layered config in JSON, YAML, TOML | — | |||
| 💉 | ozzo-di | Dependency injection container | — |
The flagship library. Validation using normal Go code instead of error-prone struct tags:
package main
import (
"fmt"
validation "github.com/go-ozzo/ozzo-validation/v4"
"github.com/go-ozzo/ozzo-validation/v4/is"
)
type User struct {
Name string
Email string
Age int
}
func (u User) Validate() error {
return validation.ValidateStruct(&u,
validation.Field(&u.Name, validation.Required, validation.Length(3, 50)),
validation.Field(&u.Email, validation.Required, is.EmailFormat),
validation.Field(&u.Age, validation.Required, validation.Min(18)),
)
}
func main() {
u := User{Name: "Jo", Email: "bad", Age: 10}
fmt.Println(u.Validate())
// Output: Age: must be no less than 18; Email: must be a valid email address;
// Name: the length must be between 3 and 50.
}Why ozzo-validation over struct tags?
- IDE autocomplete and compile-time checks
- Complex conditional rules with
When() - Custom validators with
By() - Map validation without structs
- Context-aware validation
After being unmaintained since 2020, go-ozzo is actively maintained again as of July 2026.
What's happening:
- Full review of all open PRs and issues completed
- Bug fixes and community contributions being reviewed and merged
- CI being modernized (GitHub Actions, golangci-lint, codecov)
- New validation rules coming: UUID v7, ULID, and more
All improvements are additive and backward-compatible — no import path changes, no migration needed. Minimum Go version is being updated from 1.13 to 1.21+ (discussion).
See ozzo-validation#207 for the full roadmap and discussion.
| Name | Role | |
|---|---|---|
| @qiangxue | Creator, Yii Framework author | |
| @kolkov | Active maintainer, GoGPU author |
We welcome contributions! Start with:
good first issuelabels for newcomers- Open issues and PRs on individual repositories
- Join the discussion in ozzo-validation#207
All projects are licensed under the MIT License.
Idiomatic Go libraries for building better web applications
github.com/go-ozzo