Skip to content

Installation ​

Added: v1.0.0

Prerequisites ​

  • Go 1.25 or later (required for http.CrossOriginProtection)
  • A Go module project (go mod init if starting fresh)

Install the Core Package ​

bash
go get github.com/Pavan-Silva/go-zen
go
import "github.com/Pavan-Silva/go-zen"

Optional Sub-packages ​

Zen ships with optional packages for middleware, auth, and environment config:

go
import "github.com/Pavan-Silva/go-zen/middleware"
import "github.com/Pavan-Silva/go-zen/auth"
import "github.com/Pavan-Silva/go-zen/env"
  • middleware - CORS, Cross-Origin Protection, rate limit, compression, recover, body limit, logger
  • auth - JWT, Basic Auth, API Key, Session, OAuth2, OIDC with role-based and permission-based access
  • env - Type-safe environment variable parsing with defaults and Must* variants

Released under the MIT License.