back to home

thomaspoignant / go-feature-flag

GO Feature Flag is a simple, complete and lightweight self-hosted feature flag solution 100% Open Source. 🎛️

View on GitHub
1,969 stars
203 forks
29 issues

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing thomaspoignant/go-feature-flag in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/thomaspoignant/go-feature-flag)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

--> 🎛️ GO Feature Flag GO Feature Flag is a simple, complete and lightweight self-hosted feature flag solution 100% Open Source. > :pray: If you are using **GO Feature Flag** please consider to add yourself in the adopters list. > This simple act significantly boosts the project's visibility and credibility, making a substantial contribution to its advancement. > > If you want to support me and GO Feature Flag, you can also become a sponsor. Table of Contents • 🎛️ GO Feature Flag • What is GO Feature Flag? • What can I do with GO Feature Flag? • Part of the OpenFeature Ecosystem • Getting started with GO Feature Flag • Can I use GO Feature Flag with any language? • Where do I store my flags file? • Flags file format • Rule format • Evaluation Context • Variations • Rollout • Complex rollout strategy available • Notifiers • Export data • Linter • How can I contribute? • Contributors • Sponsors • Adopters What is GO Feature Flag? GO Feature Flag is a lightweight and open-source solution that provides a simple and complete feature flag implementation. The solution has been built to facilitate the usage of feature flags in your code with the easiest setup possible. Originally, **GO Feature Flag** was designed as a solution exclusively for the language. With the new standardization of feature flags by the Openfeature project, the solution is now available for multiple languages _(list of supported languages)_ through a simple API server called the relay proxy, which can be hosted. > [!TIP] > If you are not familiar with feature flags, I've written an article which explains why feature flags can fasten your iteration cycle. What can I do with GO Feature Flag? • Use the feature flag standard OpenFeature in your favorite language _(see list)_. • Storing your configuration flags file on various locations ( , , , _see full list_). • Configuring your flags in various format ( , and ). • Adding complex rules to target your users. • Use a complex rollout strategy for your flags : • Run A/B testing experimentation. • Progressively rollout a feature. • Schedule your flag updates. • Exporting your flags usage data to various destinations such as _( , , , , see the _full list_)_. • Getting notified when a flag has been changed _( and )_. • Support your full stack, from the backend to the frontend including your mobile apps. https://github.com/user-attachments/assets/56e1a2a2-996f-4db8-9c93-28c057e4ed5a _The code of this demo is available in repository_. Part of the OpenFeature Ecosystem At GO Feature Flag, we believe in the power of open standards and, the importance of vendor neutrality. That's why we've chosen to rely on Open Feature for our SDKs. By adopting GO Feature Flag you embrace the OpenFeature standard and you get all the benefits of the ecosystem. • Open-Source standard SDKs • No Vendor Lock-In • OpenFeature community based support for SDKs Getting started > [!IMPORTANT] > Before starting to use **GO Feature Flag** you should decide > if you want to use Open Feature SDKs or if you want to use GO Feature Flag as a GO Module. > > We recommend using the relay-proxy for a central flag management and evaluation solution, > it enables the multi-languages support, and it integrates seamlessly with the Open Feature SDKs. > This is the best way to get full potential of GO Feature Flag. > > If your project is exclusively in GO, the GO module is an option. It will perform the flag evaluation directly in your GO code. Using Open Feature SDKs Create a feature flag configuration Create a new file containing your first flag configuration. This flag split the usage of this flag, 20% will use the variation and 80% the variation . Create a relay proxy configuration file Create a new file containing the configuration of your relay proxy. Install the relay proxy And we will run the **relay proxy** locally to make the API available. The default port will be . _If you don't want to use docker to install the **relay proxy** you can follow other ways to install it in the documentation._ Use Open Feature SDK _In this example, we are using the **nodejs SDK**, but you can check other languages here._ Install dependencies Init your Open Feature client In your app initialization, you have to create a client using the Open Feature SDK and initialize it. Evaluate your flag Now you can evaluate your flags anywhere in your code using this client. Using the GO Module Installation Create a feature flag configuration Create a new file containing your first flag configuration. This flag split the usage of this flag, 20% will use the variation and 80% the variation . SDK Initialisation First, you need to initialize the with the location of your backend file. *This example will load a file from your local computer and will refresh the flags every 3 seconds (if you omit the PollingInterval, the default value is 60 seconds).* > ℹ info This is a basic configuration to test locally, in production it is better to use a remote place to store your feature flag configuration file. Look at the list of available options in the **Store your feature flag file** page. Evaluate your flags Now you can evaluate your flags anywhere in your code. The full documentation is available on https://docs.gofeatureflag.org You can find more examples in the examples/ directory. Can I use GO Feature Flag with any language? Originally GO Feature Flag was built to be a GOlang only library, but it limits the ecosystem too much. To be compatible with more languages we have implemented the GO Feature Flag Relay Proxy. It is a service you can host that provides an API to evaluate your flags, you can call it using HTTP to get your variation. Since we believe in standardization we are also implementing OpenFeature providers to interact with this API in the language of your choice. _(OpenFeature is still at an early stage, so not all languages are supported and expect some changes in the future)_ For now, we have pr…