diff --git a/pkg/services/featuremgmt/static_provider_test.go b/pkg/services/featuremgmt/static_provider_test.go index 50b92563992..b314475c244 100644 --- a/pkg/services/featuremgmt/static_provider_test.go +++ b/pkg/services/featuremgmt/static_provider_test.go @@ -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, }, } diff --git a/pkg/setting/setting_feature_toggles.go b/pkg/setting/setting_feature_toggles.go index de9ba72a3de..8231317be15 100644 --- a/pkg/setting/setting_feature_toggles.go +++ b/pkg/setting/setting_feature_toggles.go @@ -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`