File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ func mergeDuplicates(imageModels []types.ImageModel) []types.ImageModel {
29
29
for _ , location := range img .ImageLocations {
30
30
found := false
31
31
for _ , existingLocation := range aggregated [img .Name ] {
32
- if existingLocation . Origin == location . Origin && existingLocation . Path == location . Path {
32
+ if isSameLocation ( location , existingLocation ) {
33
33
found = true
34
34
break
35
35
}
@@ -51,3 +51,9 @@ func mergeDuplicates(imageModels []types.ImageModel) []types.ImageModel {
51
51
52
52
return result
53
53
}
54
+
55
+ func isSameLocation (loc1 , loc2 types.ImageLocation ) bool {
56
+ return loc1 .Origin == loc2 .Origin && loc1 .Path == loc2 .Path &&
57
+ loc1 .FinalStage == loc2 .FinalStage && loc1 .Line == loc2 .Line &&
58
+ loc1 .StartIndex == loc2 .StartIndex && loc1 .EndIndex == loc2 .EndIndex
59
+ }
You can’t perform that action at this time.
0 commit comments