aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/configfile/feature_flags.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/configfile/feature_flags.go b/internal/configfile/feature_flags.go
index d6627a5..d5bd6d4 100644
--- a/internal/configfile/feature_flags.go
+++ b/internal/configfile/feature_flags.go
@@ -1,5 +1,9 @@
package configfile
+import (
+ "slices"
+)
+
type flagIota int
const (
@@ -64,10 +68,5 @@ func isFeatureFlagKnown(flag string) bool {
// IsFeatureFlagSet returns true if the feature flag "flagWant" is enabled.
func (cf *ConfFile) IsFeatureFlagSet(flagWant flagIota) bool {
flagString := knownFlags[flagWant]
- for _, flag := range cf.FeatureFlags {
- if flag == flagString {
- return true
- }
- }
- return false
+ return slices.Contains(cf.FeatureFlags, flagString)
}