(collect func(out func(key string)))
| 108 | } |
| 109 | |
| 110 | func normalizeModelPairs(collect func(out func(key string))) []string { |
| 111 | seen := make(map[string]struct{}) |
| 112 | keys := make([]string, 0) |
| 113 | collect(func(key string) { |
| 114 | if _, exists := seen[key]; exists { |
| 115 | return |
| 116 | } |
| 117 | seen[key] = struct{}{} |
| 118 | keys = append(keys, key) |
| 119 | }) |
| 120 | if len(keys) == 0 { |
| 121 | return nil |
| 122 | } |
| 123 | sort.Strings(keys) |
| 124 | return keys |
| 125 | } |
| 126 | |
| 127 | func hashJoined(keys []string) string { |
| 128 | if len(keys) == 0 { |
no outgoing calls
no test coverage detected