// NewMapStringInterfacePtr ...
344010
func NewMapStringInterfacePtr(val map[string]interface{}) *map[string]interface{} {
	ptrValue := new(map[string]interface{})
	*ptrValue = map[string]interface{}{}
	for key, value := range val {
		(*ptrValue)[key] = value
	}
	return ptrValue
}
901438
func GetInterfaces() map[string]struct{} {
	ipmap := map[string]struct{}{}

	ifaces, _ := net.Interfaces()
	for _, intf := range ifaces {
		addrs, _ := intf.Addrs()
		for _, addr := range addrs {
			ip, _, _ := net.ParseCIDR(addr.String())
			if ip.To4() != nil {
				ipmap[ip.String()] = struct{}{}
			}
		}
	}
	return ipmap
}
1356343
func NewMapper(opt Option) *Mapper {
	if opt.NameFunc == nil {
		opt.NameFunc = ToUpperCamelCase
	}
	if opt.TagName == "" {
		opt.TagName = "gluamapper"
	}
	return &Mapper{opt}
}
971388
func CastToMapStringInterfacePtr(value interface{}) (*map[string]interface{}, bool) {
	casted, ok := CastToMapStringInterface(value)
	if !ok {
		return nil, false
	}
	return pointers.NewMapStringInterfacePtr(casted), true
}
1318654
func toStringMap(val interface{}) interface{} {
	switch actual := val.(type) {
	case map[interface{}]interface{}:
		m := make(map[string]interface{})
		for k, v := range actual {
			m[toString(k)] = toStringMap(v)
		}
		return m
	case []interface{}:
		mapSlice := make([]interface{}, len(actual))
		for i, e := range actual {
			mapSlice[i] = toStringMap(e)
		}
		return mapSlice
	default:
		return actual
	}
}
171982
func (o *OS) ToStringMap() map[string]string {
	return map[string]string{
		"host_kernel_name":    o.HostKernelName,
		"host_kernel_release": o.HostKernelRelease,
		"host_kernel_version": o.HostKernelVersion,
		"host_os_name":        o.HostOSName,
		"host_linux_version":  o.HostLinuxVersion,
	}
}
102897
func stringStringMapParser(rd *proto.Reader, n int64) (interface{}, error) {
	m := make(map[string]string, n/2)
	for i := int64(0); i < n; i += 2 {
		key, err := rd.ReadString()
		if err != nil {
			return nil, err
		}

		value, err := rd.ReadString()
		if err != nil {
			return nil, err
		}

		m[key] = value
	}
	return m, nil
}
496102
func stringIntMapParser(rd *proto.Reader, n int64) (interface{}, error) {
	m := make(map[string]int64, n/2)
	for i := int64(0); i < n; i += 2 {
		key, err := rd.ReadString()
		if err != nil {
			return nil, err
		}

		n, err := rd.ReadIntReply()
		if err != nil {
			return nil, err
		}

		m[key] = n
	}
	return m, nil
}
437262
func NewInterfaceAPI(client *Client) *InterfaceAPI {
	return &InterfaceAPI{
		&baseAPI{
			client: client,
			FuncGetResourceURL: func() string {
				return "interface"
			},
		},
	}
}
660116
func NewOSPFInterface() *OSPFInterface {

	return &OSPFInterface{
		PassiveEnabled:     false,
		AdminState:         "UP",
		DeadInterval:       40,
		HelloInterval:      10,
		InterfaceType:      "BROADCAST",
		Priority:           1,
		AuthenticationType: "NONE",
	}
}
686089
func NestedStringMap(obj map[string]interface{}, fields ...string) (map[string]string, bool, error) {
	m, found, err := nestedMapNoCopy(obj, fields...)
	if !found || err != nil {
		return nil, found, err
	}
	strMap := make(map[string]string, len(m))
	for k, v := range m {
		if str, ok := v.(string); ok {
			strMap[k] = str
		} else {
			return nil, false, fmt.Errorf("%v accessor error: contains non-string key in the map: %v is of the type %T, expected string", jsonPath(fields), v, v)
		}
	}
	return strMap, true, nil
}
691398
func NewStringPtr(val string) *string {
	ptrValue := new(string)
	*ptrValue = val
	return ptrValue
}
820077
func CopyMapStringSliceString(m map[string][]string) map[string][]string {
	l := len(m)
	if l == 0 {
		return nil
	}

	c := make(map[string][]string, l)
	for k, v := range m {
		c[k] = CopySliceString(v)
	}
	return c
}
75239
func (l *Language) GetStringMap(key string) map[string]interface{} {
	return cast.ToStringMap(l.Get(key))
}
1102121
func NewMapperFunc(tagName string, f func(string) string) *Mapper {
	return &Mapper{
		cache:   make(map[reflect.Type]*StructMap),
		tagName: tagName,
		mapFunc: f,
	}
}
496595
func MergeStringStringMap(m1, m2 map[string]string) map[string]string {
	mergedMap := CloneStringStringMap(m1)
	for k, v := range m2 {
		mergedMap[k] = v
	}
	return mergedMap
}
1054504
func CastToMapStringInterface(value interface{}) (map[string]interface{}, bool) {
	castedValue, ok := value.(map[interface{}]interface{})
	desiredMap := map[string]interface{}{}
	for key, value := range castedValue {
		keyStr, ok := key.(string)
		if !ok {
			return map[string]interface{}{}, false
		}
		desiredMap[keyStr] = value
	}
	return desiredMap, ok
}