env
A highly secure Go environment variable management library supporting .env, JSON, and YAML formats, with thread safety, audit logging, and secure storage.
Core Features
- Multi-Format Support -
.env, JSON, YAML auto-detection - Type Safety - Automatic type conversion and validation
- Thread Safety - Thread-safe concurrent access with sharded locking
- Secure Storage - Memory locking and auto-zeroing for sensitive values
- Audit Logging - Complete operation tracking
- Variable Expansion -
${VAR}syntax support - Struct Mapping - Tag-driven configuration binding
Key Features Overview
| Feature | Description |
|---|---|
| Type Conversion | GetString, GetInt, GetBool, GetDuration, GetSlice |
| Struct Mapping | Tag-driven configuration binding |
| Secure Storage | Memory-protected sensitive values |
| Multi-Format Loading | .env, JSON, YAML |
Quick Navigation
Getting Started
- Quick Start - 5-minute tutorial
- Cheat Sheet - Common code snippets
API Reference
- Package Functions - Complete API documentation
- Loader - Loader methods
- SecureValue - Secure value handling
Security
- Security Overview - Security architecture and best practices