Update pkg/setting/setting_feature_toggles.go

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
This commit is contained in:
Denis Vodopianov
2025-12-18 10:13:11 +01:00
committed by grambbledook
parent 78c20c0cb9
commit 795ffb8126
2 changed files with 12 additions and 10 deletions
@@ -261,7 +261,7 @@ func makeFlags(tt struct {
config := map[string]setting.FeatureToggle{
tt.name: {
Name: tt.name,
Type: setting.FeatureToggleType(tt.typ.String()),
Type: setting.FeatureFlagType(tt.typ.String()),
Value: tt.configValue,
},
}
+11 -9
View File
@@ -10,18 +10,20 @@ import (
"github.com/grafana/grafana/pkg/util"
)
type FeatureToggleType string
type FeatureFlagType string
const Structure FeatureToggleType = "structure"
const Integer FeatureToggleType = "integer"
const Float FeatureToggleType = "float"
const Boolean FeatureToggleType = "boolean"
const String FeatureToggleType = "string"
const (
Structure FeatureFlagType = "structure"
Integer FeatureFlagType = "integer"
Float FeatureFlagType = "float"
Boolean FeatureFlagType = "boolean"
String FeatureFlagType = "string"
)
type FeatureToggle struct {
Type FeatureToggleType `json:"type"`
Name string `json:"name"`
Value any `json:"value"`
Type FeatureFlagType `json:"type"`
Name string `json:"name"`
Value any `json:"value"`
}
// Deprecated: should use `featuremgmt.FeatureToggles`