// tagsToMap turns the list of tags into a map.
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
}
1192285
func tagsToMapELBv2(ts []*elbv2.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredELBv2(t) {
			result[*t.Key] = *t.Value
		}
	}

	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
}
702039
func tagsToMapKMS(ts []*kms.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredKMS(t) {
			result[aws.StringValue(t.TagKey)] = aws.StringValue(t.TagValue)
		}
	}

	return result
}
778168
func tagsMapToRaw(m map[string]string) map[string]interface{} {
	raw := make(map[string]interface{})
	for k, v := range m {
		raw[k] = v
	}

	return raw
}
765717
func jsonToMap(marshaled []byte) (map[string]interface{}, error) {
	tree := make(map[string]interface{})
	d := json.NewDecoder(bytes.NewReader(marshaled))
	d.UseNumber()
	err := d.Decode(&tree)
	if err != nil {
		return nil, fmt.Errorf("error unmarshaling intermediate JSON: %s", err)
	}
	return tree, nil
}
1033790
func tagsFromMapR53(m map[string]interface{}) []*route53.Tag {
	result := make([]*route53.Tag, 0, len(m))
	for k, v := range m {
		t := &route53.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredRoute53(t) {
			result = append(result, t)
		}
	}

	return result
}
54477
func tagsToMapElasticsearchService(ts []*elasticsearch.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredElasticsearchService(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
1143371
func tagsToMapKinesisFirehose(ts []*firehose.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredKinesisFirehose(t) {
			result[aws.StringValue(t.Key)] = aws.StringValue(t.Value)
		}
	}

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

	return result
}
812757
func tagsToMapCloudWatchEvents(ts []*events.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredCloudWatchEvents(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
232976
func tagsFromMapSfn(tagMap map[string]interface{}) []*sfn.Tag {
	tags := make([]*sfn.Tag, 0, len(tagMap))
	for tagKey, tagValueRaw := range tagMap {
		tag := &sfn.Tag{
			Key:   aws.String(tagKey),
			Value: aws.String(tagValueRaw.(string)),
		}
		if !tagIgnoredSfn(tag) {
			tags = append(tags, tag)
		}
	}

	return tags
}
50206
func tagsFromMapECS(tagMap map[string]interface{}) []*ecs.Tag {
	tags := make([]*ecs.Tag, 0, len(tagMap))
	for tagKey, tagValueRaw := range tagMap {
		tag := &ecs.Tag{
			Key:   aws.String(tagKey),
			Value: aws.String(tagValueRaw.(string)),
		}
		if !tagIgnoredECS(tag) {
			tags = append(tags, tag)
		}
	}

	return tags
}
263177
func xmlToMap(doc []byte, r bool) (map[string]interface{}, error) {
	b := bytes.NewReader(doc)
	p := xml.NewDecoder(b)
	p.CharsetReader = X2jCharsetReader
	return xmlToMapParser("", nil, p, r)
}
646735
func tagsFromMapRAM(m map[string]interface{}) []*ram.Tag {
	result := make([]*ram.Tag, 0, len(m))
	for k, v := range m {
		t := &ram.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredRAM(t) {
			result = append(result, t)
		}
	}

	return result
}
79973
func tagsToMapDynamoDb(ts []*dynamodb.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		result[*t.Key] = *t.Value
	}
	return result
}