// FromValues parses the data in v and populates `c`
766167
func (c *GroupsListCall) FromValues(v url.Values) error {
	var tmp GroupsListCall
	if raw := strings.TrimSpace(v.Get("exclude_archived")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "exclude_archived"`)
		}
		tmp.excludeArchived = parsed
	}
	if raw := strings.TrimSpace(v.Get("exclude_members")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "exclude_members"`)
		}
		tmp.excludeMembers = parsed
	}
	*c = tmp
	return nil
}
279500
func (c *Client) GetValues(keys []string) (map[string]string, error) {
	allEnvVars := os.Environ()
	envMap := make(map[string]string)
	for _, e := range allEnvVars {
		index := strings.Index(e, "=")
		envMap[e[:index]] = e[index+1:]
	}
	vars := make(map[string]string)
	for _, key := range keys {
		k := transform(key)
		for envKey, envValue := range envMap {
			if strings.HasPrefix(envKey, k) {
				vars[clean(envKey)] = envValue
			}
		}
	}

	log.Debug(fmt.Sprintf("Key Map: %#v", vars))

	return vars, nil
}
330667
func (c *GroupsSetTopicCall) FromValues(v url.Values) error {
	var tmp GroupsSetTopicCall
	if raw := strings.TrimSpace(v.Get("channel")); len(raw) > 0 {
		tmp.channel = raw
	}
	if raw := strings.TrimSpace(v.Get("topic")); len(raw) > 0 {
		tmp.topic = raw
	}
	*c = tmp
	return nil
}
1287724
func (v *ViewModel) FromJS(obj *js.Object) *ViewModel {
	for _, key := range js.Keys(obj) {
		// skip internal or unexported field
		if strings.HasPrefix(key, "$") || strings.HasPrefix(key, "_") {
			continue
		}
		v.Object.Set(key, obj.Get(key))
	}
	return v
}
300458
func (p *Parser) parseValues() (sets.String, error) {
	tok, lit := p.consume(Values)
	if tok != OpenParToken {
		return nil, fmt.Errorf("found '%s' expected: '('", lit)
	}
	tok, lit = p.lookahead(Values)
	switch tok {
	case IdentifierToken, CommaToken:
		s, err := p.parseIdentifiersList() // handles general cases
		if err != nil {
			return s, err
		}
		if tok, _ = p.consume(Values); tok != ClosedParToken {
			return nil, fmt.Errorf("found '%s', expected: ')'", lit)
		}
		return s, nil
	case ClosedParToken: // handles "()"
		p.consume(Values)
		return sets.NewString(""), nil
	default:
		return nil, fmt.Errorf("found '%s', expected: ',', ')' or identifier", lit)
	}
}
466573
func (c *Client) GetValues(keys []string) (map[string]string, error) {
	// Use all operations on the same revision
	var first_rev int64 = 0
	vars := make(map[string]string)
	// Default ETCDv3 TXN limitation. Since it is configurable from v3.3,
	// maybe an option should be added (also set max-txn=0 can disable Txn?)
	maxTxnOps := 128
	getOps := make([]string, 0, maxTxnOps)
	doTxn := func (ops []string) error {
		ctx, cancel := context.WithTimeout(context.Background(), time.Duration(3) * time.Second)
		defer cancel()
		
		txnOps := make([]clientv3.Op, 0, maxTxnOps)
		
		for _, k := range ops {
			txnOps = append(txnOps, clientv3.OpGet(k,
											   clientv3.WithPrefix(),
											   clientv3.WithSort(clientv3.SortByKey, clientv3.SortDescend),
											   clientv3.WithRev(first_rev)))
		}
		
		result, err := c.client.Txn(ctx).Then(txnOps...).Commit()
		if err != nil {
			return err
		}
		for i, r := range result.Responses {
			originKey := ops[i]
			// append a '/' if not already exists
			originKeyFixed := originKey
			if !strings.HasSuffix(originKeyFixed, "/") {
				originKeyFixed = originKey + "/"
			}
			for _, ev := range r.GetResponseRange().Kvs {
				k := string(ev.Key)
				if k == originKey || strings.HasPrefix(k, originKeyFixed) {
					vars[string(ev.Key)] = string(ev.Value)
				}
			}
		}
		if first_rev == 0 {
			// Save the revison of the first request
			first_rev = result.Header.GetRevision()
		}
		return nil
	}
	for _, key := range keys {
		getOps = append(getOps, key)
		if len(getOps) >= maxTxnOps {
			if err := doTxn(getOps); err != nil {
				return vars, err
			}
			getOps = getOps[:0]
		}
	}
	if len(getOps) > 0 {
		if err := doTxn(getOps); err != nil {
			return vars, err
		}
	}
	return vars, nil
}
1259614
func (ms *MaxSeries) GetValues(index int) (x, y float64) {
	ms.ensureMaxValue()
	x, _ = ms.InnerSeries.GetValues(index)
	y = *ms.maxValue
	return
}
1178583
func (c *ReactionsListCall) FromValues(v url.Values) error {
	var tmp ReactionsListCall
	if raw := strings.TrimSpace(v.Get("count")); len(raw) > 0 {
		parsed, err := strconv.ParseInt(raw, 10, 64)
		if err != nil {
			return errors.Wrap(err, `failed to parse integer value "count"`)
		}
		tmp.count = int(parsed)
	}
	if raw := strings.TrimSpace(v.Get("full")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "full"`)
		}
		tmp.full = parsed
	}
	if raw := strings.TrimSpace(v.Get("page")); len(raw) > 0 {
		parsed, err := strconv.ParseInt(raw, 10, 64)
		if err != nil {
			return errors.Wrap(err, `failed to parse integer value "page"`)
		}
		tmp.page = int(parsed)
	}
	if raw := strings.TrimSpace(v.Get("user")); len(raw) > 0 {
		tmp.user = raw
	}
	*c = tmp
	return nil
}
1021049
func (dht *IpfsDHT) GetValues(ctx context.Context, key string, nvals int) (_ []RecvdVal, err error) {
	eip := logger.EventBegin(ctx, "GetValues")

	eip.Append(loggableKey(key))
	defer eip.Done()

	valCh, err := dht.getValues(ctx, key, nvals)
	if err != nil {
		eip.SetError(err)
		return nil, err
	}

	out := make([]RecvdVal, 0, nvals)
	for val := range valCh {
		out = append(out, val)
	}

	return out, ctx.Err()
}
1221957
func (args Args) WalkValues(field string, op func(value string) error) error {
	if _, ok := args.fields[field]; !ok {
		return nil
	}
	for v := range args.fields[field] {
		if err := op(v); err != nil {
			return err
		}
	}
	return nil
}
1165342
func (macd *MACDSeries) GetValues(index int) (x float64, y float64) {
	if macd.InnerSeries == nil {
		return
	}

	if macd.signal == nil || macd.macdl == nil {
		macd.ensureChildSeries()
	}

	_, lv := macd.macdl.GetValues(index)
	_, sv := macd.signal.GetValues(index)

	x, _ = macd.InnerSeries.GetValues(index)
	y = lv - sv

	return
}
541488
func (m *PaginationMeta) EncodeValues(name string, values *url.Values) error {
	if m == nil {
		return nil
	}

	if m.Offset != 0 {
		values.Set("offset", fmt.Sprintf("%d", m.Offset))
	}
	if m.Length != 0 {
		values.Set("length", fmt.Sprintf("%d", m.Length))
	}
	if m.OrderBy != "" {
		values.Set("orderby", m.OrderBy)
	}
	if m.Sort != "" {
		values.Set("sort", m.Sort)
	}

	return nil
}
665870
func FromMapKeys(m interface{}) interface{} {
	inValue := reflect.ValueOf(m)
	outValue := reflect.MakeSlice(reflect.SliceOf(inValue.Type().Key()), inValue.Len(), inValue.Len())
	for i, key := range inValue.MapKeys() {
		outValue.Index(i).Set(key)
	}
	return outValue.Interface()
}
139105
func (c *BotsInfoCall) FromValues(v url.Values) error {
	var tmp BotsInfoCall
	if raw := strings.TrimSpace(v.Get("bot")); len(raw) > 0 {
		tmp.bot = raw
	}
	*c = tmp
	return nil
}
640017
func (c *ChatUpdateCall) FromValues(v url.Values) error {
	var tmp ChatUpdateCall
	if raw := strings.TrimSpace(v.Get("as_user")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "as_user"`)
		}
		tmp.asUser = parsed
	}
	if raw := strings.TrimSpace(v.Get("attachments")); len(raw) > 0 {
		if err := tmp.attachments.Decode(raw); err != nil {
			return errors.Wrap(err, `failed to decode value "attachments"`)
		}
	}
	if raw := strings.TrimSpace(v.Get("channel")); len(raw) > 0 {
		tmp.channel = raw
	}
	if raw := strings.TrimSpace(v.Get("linkNames")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "linkNames"`)
		}
		tmp.linkNames = parsed
	}
	if raw := strings.TrimSpace(v.Get("parse")); len(raw) > 0 {
		tmp.parse = raw
	}
	if raw := strings.TrimSpace(v.Get("text")); len(raw) > 0 {
		tmp.text = raw
	}
	if raw := strings.TrimSpace(v.Get("ts")); len(raw) > 0 {
		tmp.timestamp = raw
	}
	*c = tmp
	return nil
}
13761
func (c *CtxDimensions) From(ctx context.Context) []interface{} {
	existing := ctx.Value(c)
	if existing == nil {
		return []interface{}{}
	}
	return existing.([]interface{})
}
1011063
func (s *SetDimension) SetValues(v []*string) *SetDimension {
	s.Values = v
	return s
}