func ParseFeatures(queryString string) error {
	featureMutex.Lock()
	defer featureMutex.Unlock()

	features := map[Feature]bool{}
	// copy the defaults into this map
	for k, v := range featureDefaults {
		features[k] = v
	}

	values, err := url.ParseQuery(queryString)
	if err != nil {
		return errors.Wrap(err, "error parsing query string for feature gates")
	}

	for k := range values {
		f := Feature(k)

		if _, ok := featureDefaults[f]; !ok {
			return errors.Errorf("Feature Gate %q is not a valid Feature Gate", f)
		}

		b, err := strconv.ParseBool(values.Get(k))
		if err != nil {
			return errors.Wrapf(err, "error parsing bool value from flag %s ", k)
		}
		features[f] = b
	}

	featureGates = features
	return nil
}
// ParseFeatures parses the url encoded query string of features and stores the value
// for later retrieval
ParseFeatures parses the url encoded query string of features and stores the value
for later retrieval
// ParseFeatures parses the url encoded query string of features and stores the value // for later retrieval
func ParseFeatures(queryString string) error {
	featureMutex.Lock()
	defer featureMutex.Unlock()
	features := map[Feature]bool{}
	for k, v := range featureDefaults {
		features[k] = v
	}
	values, err := url.ParseQuery(queryString)
	if err != nil {
		return errors.Wrap(err, "error parsing query string for feature gates")
	}
	for k := range values {
		f := Feature(k)
		if _, ok := featureDefaults[f]; !ok {
			return errors.Errorf("Feature Gate %q is not a valid Feature Gate", f)
		}
		b, err := strconv.ParseBool(values.Get(k))
		if err != nil {
			return errors.Wrapf(err, "error parsing bool value from flag %s ", k)
		}
		features[f] = b
	}
	featureGates = features
	return nil
}
func ParseFeatures ( queryString string ) error { featureMutex . Lock ( ) defer featureMutex . Unlock ( ) features := map [ Feature ] bool { } for k , v := range featureDefaults { features [ k ] = v } values , err := url . ParseQuery ( queryString ) if err != nil { return errors . Wrap ( err , " " ) } for k := range values { f := Feature ( k ) if _ , ok := featureDefaults [ f ] ; ! ok { return errors . Errorf ( " " , f ) } b , err := strconv . ParseBool ( values . Get ( k ) ) if err != nil { return errors . Wrapf ( err , " " , k ) } features [ f ] = b } featureGates = features return nil }
ParseFeatures parses the url encoded query string of features and stores the value
for later retrieval
ParseFeatures parses the url encoded query string of features and stores the value for later retrieval
// copy the defaults into this map