// Uint32Map converts a string map of uint32 values uinto a string
// map of uint32 pouinters
429549
func Uint32Map(src map[string]uint32) map[string]*uint32 {
	dst := make(map[string]*uint32)
	for k, val := range src {
		v := val
		dst[k] = &v
	}
	return dst
}
82246
func (g *Container) ChildrenMap() (map[string]*Container, error) {
	if mmap, ok := g.Data().(map[string]interface{}); ok {
		children := map[string]*Container{}
		for name, obj := range mmap {
			children[name] = &Container{obj}
		}
		return children, nil
	}
	return nil, ErrNotObj
}
444921
func StringValueMap(src map[string]*string) map[string]string {
	dst := make(map[string]string)
	for k, val := range src {
		if val != nil {
			dst[k] = *val
		}
	}
	return dst
}
782743
func convertMap(datum interface{}) (map[string]interface{}, error) {
	mapValues, ok := datum.(map[string]interface{})
	if ok {
		return mapValues, nil
	}
	// NOTE: When given a map of any other type, zip values to items as a
	// convenience to client.
	v := reflect.ValueOf(datum)
	if v.Kind() != reflect.Map {
		return nil, fmt.Errorf("cannot create map[string]interface{}: expected map[string]...; received: %T", datum)
	}
	// NOTE: Two better alternatives to the current algorithm are:
	//   (1) mutate the reflection tuple underneath to convert the
	//       map[string]int, for example, to map[string]interface{}, with
	//       O(1) complexity.
	//   (2) use copy builtin to zip the data items over with O(n) complexity,
	//       but more efficient than what's below.
	mapValues = make(map[string]interface{}, v.Len())
	for _, key := range v.MapKeys() {
		k, ok := key.Interface().(string)
		if !ok {
			// bail when map key type is not string
			return nil, fmt.Errorf("cannot create map[string]interface{}: expected map[string]...; received: %T", datum)
		}
		mapValues[string(k)] = v.MapIndex(key).Interface()
	}
	return mapValues, nil
}
381025
func (s *Application) DefaultFuncMap() (r map[string]interface{}) {
	r = tplfunc.New()
	r["RootURL"] = func(p ...string) string {
		if len(p) > 0 {
			return s.URL + p[0]
		}
		return s.URL
	}
	r["RootModuleURL"] = func(ctl string, act string, params ...interface{}) string {
		return s.URLBuilder.Build(s.RootModuleName, ctl, act, params...)
	}
	r["ModuleRootURL"] = func(module string) string {
		return s.Module(module).URL
	}
	r["URLFor"] = s.URLBuilder.Build
	return
}
1012619
func Int64Map(result interface{}, err error) (map[string]int64, error) {
	values, err := Values(result, err)
	if err != nil {
		return nil, err
	}
	if len(values)%2 != 0 {
		return nil, errors.New("redigo: Int64Map expects even number of values result")
	}
	m := make(map[string]int64, len(values)/2)
	for i := 0; i < len(values); i += 2 {
		key, ok := values[i].([]byte)
		if !ok {
			return nil, errors.New("redigo: Int64Map key not a bulk string value")
		}
		value, err := Int64(values[i+1], nil)
		if err != nil {
			return nil, err
		}
		m[string(key)] = value
	}
	return m, nil
}
755356
func Int64sToMap(ints []int64) map[int64]bool {
	m := make(map[int64]bool)
	for _, i := range ints {
		m[i] = true
	}
	return m
}
816707
func (tm float32InterfaceMap) PackMap(buf BufferEx) (int, error) {
	size := 0
	for k, v := range tm {
		n, err := PackFloat32(buf, k)
		size += n
		if err != nil {
			return size, err
		}

		n, err = packObject(buf, v, false)
		size += n
		if err != nil {
			return size, err
		}
	}
	return size, nil
}
1034637
func (f *Queries) Uint32(key string) (uint32, error) {
	s, err := f.String(key)
	if err != nil {
		return 0, err
	}
	v, err := strconv.ParseUint(s, 10, 32)
	return uint32(v), err
}
1253919
func Int64ValueMap(src map[string]*int64) map[string]int64 {
	dst := make(map[string]int64)
	for k, val := range src {
		if val != nil {
			dst[k] = *val
		}
	}
	return dst
}
739205
func Uint32(name rune, value uint32, helpvalue ...string) *uint32 {
	return CommandLine.Uint32(name, value, helpvalue...)
}
244885
func (m ContextMap) StringMap() (newMap map[string]string) {
	if m != nil {
		newMap = map[string]string{}
		for key, value := range m {
			if svalue, isstring := value.(string); isstring {
				newMap[key] = svalue
			}
		}
	}
	return
}
1366461
func ParseMap(raw []string) Map {
	m := make(Map, len(raw))
	for _, t := range raw {
		m.Add(Parse(t))
	}
	return m
}
1215384
func (val XMValue) UInt32() (v uint32) {
	encoding.ReadFrom(bytes.NewBuffer(val), &v)
	return
}
1044900
func (opts *Options) valuesMap(m map[string]interface{}) (map[string]interface{}, error) {
	for _, skv := range opts.Values {
		if err := strvals.ParseInto(skv, m); err != nil {
			return nil, err
		}
	}
	return m, nil
}
429518
func (m *Memory) ToStringMap() map[string]string {
	return map[string]string{
		"host_mem_total": strconv.FormatFloat(m.Total.Kilobytes(), 'f', 6, 64),
	}
}
1362938
func (tm uint64InterfaceMap) PackMap(buf BufferEx) (int, error) {
	size := 0
	for k, v := range tm {
		n, err := PackUInt64(buf, k)
		size += n
		if err != nil {
			return size, err
		}

		n, err = packObject(buf, v, false)
		size += n
		if err != nil {
			return size, err
		}
	}
	return size, nil
}