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.
Click to show internal directories.
Click to hide internal directories.