(in map[string][]string)
| 66 | } |
| 67 | |
| 68 | func cloneStringSliceMap(in map[string][]string) map[string][]string { |
| 69 | if len(in) == 0 { |
| 70 | return nil |
| 71 | } |
| 72 | out := make(map[string][]string, len(in)) |
| 73 | for key, values := range in { |
| 74 | cleanKey := normalizeProviderID(key) |
| 75 | if cleanKey == "" { |
| 76 | continue |
| 77 | } |
| 78 | out[cleanKey] = cloneStringSlice(values) |
| 79 | } |
| 80 | if len(out) == 0 { |
| 81 | return nil |
| 82 | } |
| 83 | return out |
| 84 | } |
| 85 | |
| 86 | func normalizeProviderID(provider string) string { |
| 87 | return strings.ToLower(strings.TrimSpace(provider)) |
no test coverage detected