MM-30740 Add support for boolean feature flags. (#16311)
* Add support for boolean feature flags. * Tests * Use strconv.ParseBool to accept additional values as true. * Update config/feature_flags.go Co-authored-by: Christopher Poile <cpoile@gmail.com> Co-authored-by: Christopher Poile <cpoile@gmail.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
faaac9cb74
Коммит
a87e8d1c20
@@ -7,6 +7,9 @@ type FeatureFlags struct {
|
||||
// Exists only for unit and manual testing.
|
||||
// When set to a value, will be returned by the ping endpoint.
|
||||
TestFeature string
|
||||
// Exists only for testing bool functionality. Boolean feature flags interprate "on" or "true" as true and
|
||||
// all other values as false.
|
||||
TestBoolFeature bool
|
||||
|
||||
// Toggle on and off scheduled jobs for cloud user limit emails see MM-29999
|
||||
CloudDelinquentEmailJobsEnabled bool
|
||||
@@ -14,5 +17,6 @@ type FeatureFlags struct {
|
||||
|
||||
func (f *FeatureFlags) SetDefaults() {
|
||||
f.TestFeature = "off"
|
||||
f.TestBoolFeature = false
|
||||
f.CloudDelinquentEmailJobsEnabled = false
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user