// tagsToMap turns the list of tags into a map.
348335
func tagsToMapECR(ts []*ecr.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredECR(t) {
			result[aws.StringValue(t.Key)] = aws.StringValue(t.Value)
		}
	}

	return result
}
424975
func valuesToMap(values map[string][]string) map[string]interface{} {
	ret := make(map[string]interface{})

	for key, value := range values {
		if len(value) > 0 {
			ret[key] = value[0]
		}
	}

	return ret
}
744372
func tagsToMapTransfer(ts []*transfer.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredTransfer(t) {
			result[aws.StringValue(t.Key)] = aws.StringValue(t.Value)
		}
	}

	return result
}
703266
func tagsFromMapKinesis(m map[string]interface{}) []*kinesis.Tag {
	var result []*kinesis.Tag
	for k, v := range m {
		t := &kinesis.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredKinesis(t) {
			result = append(result, t)
		}
	}

	return result
}
839736
func (_m *API) TagSnapshot(_a0 string, _a1 string) error {
	ret := _m.Called(_a0, _a1)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string) error); ok {
		r0 = rf(_a0, _a1)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
1106483
func tagsFromMapBeanstalk(m map[string]interface{}) []*elasticbeanstalk.Tag {
	var result []*elasticbeanstalk.Tag
	for k, v := range m {
		t := &elasticbeanstalk.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredBeanstalk(t) {
			result = append(result, t)
		}
	}

	return result
}
883026
func tagsToMapGeneric(ts map[string]*string) map[string]string {
	result := make(map[string]string)
	for k, v := range ts {
		if !tagIgnoredGeneric(k) {
			result[k] = aws.StringValue(v)
		}
	}

	return result
}
1197354
func tagsFromMapRDS(m map[string]interface{}) []*rds.Tag {
	result := make([]*rds.Tag, 0, len(m))
	for k, v := range m {
		t := &rds.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredRDS(t) {
			result = append(result, t)
		}
	}

	return result
}
1188005
func (s *HeaderStorer) headerToMap(headerBase64Encoded string) (map[string]string, error) {
	headerJson, err := base64.StdEncoding.DecodeString(headerBase64Encoded)
	if err != nil {
		return nil, err
	}
	var result map[string]string
	if err := json.Unmarshal([]byte(headerJson), &result); err != nil {
		return nil, err
	}
	return result, nil
}
575309
func ParseArgumentListToMap(arguments []string) map[string]string {
	resultingMap := map[string]string{}
	for i, arg := range arguments {
		key, val, err := parseArgument(arg)

		// Ignore if the first argument doesn't satisfy the criteria, it's most often the binary name
		// Warn in all other cases, but don't error out. This can happen only if the user has edited the argument list by hand, so they might know what they are doing
		if err != nil {
			if i != 0 {
				fmt.Printf("[kubeadm] WARNING: The component argument %q could not be parsed correctly. The argument must be of the form %q. Skipping...\n", arg, "--")
			}
			continue
		}

		resultingMap[key] = val
	}
	return resultingMap
}
934540
func tagsToMapSecretsManager(ts []*secretsmanager.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredSecretsManager(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
509090
func tagsToMapLicenseManager(ts []*licensemanager.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredLicenseManager(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
536119
func tagsToMapCloudWatch(ts []*cloudwatch.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredCloudWatch(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
1167826
func tagsToMapDS(ts []*directoryservice.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredDS(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
1072658
func NewTagStoreFromMap(tags map[string]string) *TagStore {
	t := &TagStore{make([]string, len(tags))}
	i := 0
	for k, v := range tags {
		t.Tags[i] = k + "=" + v
		i++
	}
	return t
}
646686
func TagsDeep(obj interface{}, key string) (map[string]string, error) {
	return tags(obj, key, true)
}
728994
func ListToMap(list []string) map[string]string {
	out := map[string]string{}
	for _, entry := range list {
		if len(entry) == 0 || entry[0] == '#' {
			continue
		}

		parts := strings.SplitN(entry, "=", 2)
		out[parts[0]] = strings.Trim(parts[1], "\"")
	}
	return out
}