noop

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFeatureFlagManager

func NewFeatureFlagManager() featureflags.FeatureFlagManager

NewFeatureFlagManager returns a FeatureFlagManager that always returns the supplied default values (or zero values for the boolean variant).

Example
package main

import (
	"context"
	"fmt"

	"github.com/primandproper/platform/featureflags"
	"github.com/primandproper/platform/featureflags/noop"
)

func main() {
	mgr := noop.NewFeatureFlagManager()
	defer func() { _ = mgr.Close() }()

	canUse, err := mgr.CanUseFeature(
		context.Background(),
		"dark-mode",
		featureflags.EvaluationContext{TargetingKey: "user-1"},
	)
	if err != nil {
		panic(err)
	}

	fmt.Println(canUse)
}
Output:
false

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL