Code Explainers

Code explainers tagged #feature-flags

java
package com.acme.billing.config;
 
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;

Feature-flagged beans with Spring @ConditionalOnProperty

feature-flags conditional-beans strategy-pattern
Intermediate 5 steps
go
package middleware
 
import (
	"hash/fnv"

A percentage feature-rollout middleware in Gin

feature-flags middleware hashing
Intermediate 6 steps
python
from fastapi import APIRouter, Depends, HTTPException, status
 
from app.config import settings
from app.dependencies import get_current_user

Gating a FastAPI route behind a feature flag

feature-flags dependency-injection authorization
Intermediate 7 steps
php
<?php
 
namespace App\FeatureFlags;
 

How a feature flag evaluator decides

feature-flags rollout hashing
Intermediate 8 steps
rust
use std::{collections::HashSet, sync::Arc};
 
use axum::{
    body::Body,

Feature-flag middleware in Axum

middleware async shared-state
Advanced 7 steps
php
<?php
 
namespace App\Providers;
 

Defining feature flags with Laravel Pennant

feature-flags service-provider config-driven
Intermediate 6 steps
php
<?php
 
namespace App\Services;
 

Caching per-tenant settings in Laravel

caching multi-tenancy dependency-injection
Intermediate 7 steps