File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed
hack/tools/cmd/gomodcheck Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -85,24 +85,28 @@ func main() {
85
85
}
86
86
87
87
if versionToRef , ok := upstreamModules [mod ]; ok {
88
- upstreams := make ([]upstream , 0 )
88
+ outOfSyncUpstream := make ([]upstream , 0 )
89
89
90
90
for upstreamVersion , upstreamRef := range versionToRef {
91
- if version != upstreamVersion {
92
- upstreams = append (upstreams , upstream {
93
- Ref : upstreamRef ,
94
- Version : upstreamVersion ,
95
- })
91
+ if version == upstreamVersion { // pass if version in sync.
92
+ continue
96
93
}
97
- }
98
94
99
- if len (upstreams ) > 0 {
100
- oosMods = append (oosMods , oosMod {
101
- Name : mod ,
102
- Version : version ,
103
- Upstreams : upstreams ,
95
+ outOfSyncUpstream = append (outOfSyncUpstream , upstream {
96
+ Ref : upstreamRef ,
97
+ Version : upstreamVersion ,
104
98
})
105
99
}
100
+
101
+ if len (outOfSyncUpstream ) == 0 { // pass if no out of sync upstreams.
102
+ continue
103
+ }
104
+
105
+ oosMods = append (oosMods , oosMod {
106
+ Name : mod ,
107
+ Version : version ,
108
+ Upstreams : outOfSyncUpstream ,
109
+ })
106
110
}
107
111
}
108
112
You can’t perform that action at this time.
0 commit comments