From 141815033536c9fbe1219a22a6363bc768204b16 Mon Sep 17 00:00:00 2001 From: Will Donnelly Date: Fri, 28 Feb 2025 17:04:57 -0600 Subject: [PATCH] common/feature_flags: Trim whitespace Makes it so a setting like `do_foo, do_bar` parses the same as `do_foo,do_bar`. Without this fix it instead parses as a flag setting `" do_bar"` which is clearly very distinct from the `"do_bar"` flag. --- go/common/feature_flags.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/common/feature_flags.go b/go/common/feature_flags.go index 617c156bc6..a2a448d8ab 100644 --- a/go/common/feature_flags.go +++ b/go/common/feature_flags.go @@ -12,6 +12,7 @@ func ParseFeatureFlags(flags string, defaults map[string]bool) map[string]bool { settings[k] = v } for _, flagName := range strings.Split(flags, ",") { + flagName = strings.TrimSpace(flagName) var flagValue = true if strings.HasPrefix(flagName, "no_") { flagName = strings.TrimPrefix(flagName, "no_")