flaggo-go
v1.1.0
Published
Go SDK for Flaggo - A minimalist, zero-config feature flag library.
Maintainers
Readme
🐹 flaggo-go
Go SDK for Flaggo - The minimalist, zero-config feature flag library.
📦 Installation
go get github.com/FabienOnnis/flaggo/flaggo-go🚀 Quick Start
package main
import (
"fmt"
"github.com/FabienOnnis/flaggo/flaggo-go"
)
func main() {
flags, err := flaggo.Load(flaggo.FlaggoOptions{
Source: "https://config.example.com/flags.json",
Context: flaggo.FlagContext{"userId": "user-123", "role": "admin"},
})
if err != nil {
panic(err)
}
// Advanced Rules targeting
if flags.IsEnabled("admin-feature", nil) {
fmt.Println("Admin feature is active!")
}
}✨ Key Features
- 🎯 Zero-config: Just a JSON file.
- ⚡ High Performance: Low-allocation rule engine (~55ns/op).
- 🎯 Advanced Targeting: Support for custom rules (role, email, plan) with operators like
==,in,matches(Regex). - 🔗 Cross-Language Consistency: Decisions stay identical across all SDKs (using FNV-1a).
- 🛡️ Environment-aware: Easily filter flags by environment.
📖 Documentation
For the full specification and other SDKs (JS, Python, Rust), visit the main repository.
📄 License
MIT
