// AppendValues serializes this structure into the provided string key-value store
// useful to build query strings
349801
func (u *ID) AppendValues(values Values) {
	values.Set("level", fmt.Sprintf("%d", u.Epoch.Level))
	values.Set("time", fmt.Sprintf("%d", u.Epoch.Time))
	u.Feed.AppendValues(values)
}
1374371
func (md MD) Append(k string, vals ...string) {
	if len(vals) == 0 {
		return
	}
	k = strings.ToLower(k)
	md[k] = append(md[k], vals...)
}
37546
func (t *Tags) Append(tag Tag) {
	t.values = append(t.values, tag)
}
206526
func (m *Meta) InsertValues(i interface{}) []interface{} {
	values := make([]interface{}, len(m.insertIndexes))
	m.CopyInsertValues(i, values)
	return values
}
763087
func (qs *QuadStore) AddValue(v quad.Value) (int64, bool) {
	id, exists := qs.resolveVal(v, true)
	return id, !exists
}
345456
func (v ExtraValues) AppendTo(body *form.Values, keyParts []string) {
	for k, vs := range v.Values {
		for _, v := range vs {
			body.Add(form.FormatKey(append(keyParts, k)), v)
		}
	}
}
125243
func (c *CtxDimensions) Append(ctx context.Context, vals ...interface{}) context.Context {
	if len(vals) == 0 {
		return ctx
	}
	if len(vals)%2 != 0 {
		panic("Expected even number of values")
	}
	existing := c.From(ctx)
	newArr := make([]interface{}, 0, len(existing)+len(vals))
	newArr = append(newArr, existing...)
	newArr = append(newArr, vals...)
	return context.WithValue(ctx, c, newArr)
}
154463
func (c *ConfigFile) AppendFiles(files ...string) error {
	c.fileNames = append(c.fileNames, files...)
	return c.Reload()
}
821927
func (d *Dataset) AppendColumnValues(header string, cols ...interface{}) error {
	return d.AppendColumn(header, cols[:])
}
449516
func (db *DB) Append(key []byte, value []byte) (int64, error) {
	if len(value) == 0 {
		return 0, nil
	}

	if err := checkKeySize(key); err != nil {
		return 0, err
	}
	key = db.encodeKVKey(key)

	t := db.kvBatch

	t.Lock()
	defer t.Unlock()

	oldValue, err := db.bucket.Get(key)
	if err != nil {
		return 0, err
	}

	if len(oldValue)+len(value) > MaxValueSize {
		return 0, errValueSize
	}

	oldValue = append(oldValue, value...)

	t.Put(key, oldValue)

	if err := t.Commit(); err != nil {
		return 0, nil
	}

	return int64(len(oldValue)), nil
}
389051
func (r *Request) QueryValues() url.Values {
	if r.Values == nil {
		if r.Request != nil {
			r.Values = r.Request.URL.Query()
		} else {
			r.Values = url.Values{}
		}
	}
	return r.Values
}
452984
func mergeValues(dest, src chartutil.Values) chartutil.Values {
	for k, v := range src {
		// If the key doesn't exist already, then just set the key to that value
		if _, exists := dest[k]; !exists {
			dest[k] = v
			continue
		}
		nextMap, ok := v.(map[string]interface{})
		// If it isn't another map, overwrite the value
		if !ok {
			dest[k] = v
			continue
		}
		// Edge case: If the key exists in the destination, but isn't a map
		destMap, isMap := dest[k].(map[string]interface{})
		// If the source map has a map for this key, prefer it
		if !isMap {
			dest[k] = v
			continue
		}
		// If we got to this point, it is a map in both, so merge them
		dest[k] = mergeValues(destMap, nextMap)
	}
	return dest
}
6904
func (list *List) Append(value Value) {
	list.values = append(list.values, value)
}
1219432
func (ctx *Context) FormValues() url.Values {
	if ctx.flagSet == nil {
		debug.Panicf("ctx.flagSet == nil")
	}
	return ctx.flagSet.values
}
32582
func (r *ReqInfo) AppendTags(key string, val string) *ReqInfo {
	if r == nil {
		return nil
	}
	r.Lock()
	defer r.Unlock()
	r.tags = append(r.tags, KeyVal{key, val})
	return r
}
412708
func append(slice *[]string, val string) {
	length := len(*slice)
	if cap(*slice) == length {
		// we need to expand
		newsl := make([]string, length, 2*(length+1))
		for i, v := range *slice {
			newsl[i] = v
		}
		*slice = newsl
	}
	*slice = (*slice)[0 : length+1]
	(*slice)[length] = val
}
1273682
func (strings Strings) AppendValue(dst []byte, quote int) []byte {
	if len(strings) == 0 {
		return dst
	}

	for _, s := range strings {
		dst = types.AppendString(dst, s, 1)
		dst = append(dst, ',')
	}
	dst = dst[:len(dst)-1]
	return dst
}