You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
result.constraints=append(result.constraints, PrettyConstraint(solver.Dependency(), fmt.Sprintf("no operators found matching the criteria of subscription %s", name)))
87
+
returnresult
91
88
}
92
89
93
90
s:=make([]string, len(dependencies))
94
91
fori, each:=rangedependencies {
95
-
s[i] =string(each)
92
+
s[i] =each.String()
93
+
}
94
+
varreqstring
95
+
iflen(s) ==1 {
96
+
req=s[0]
97
+
} else {
98
+
req=fmt.Sprintf("at least one of %s or %s", strings.Join(s[:len(s)-1], ", "), s[len(s)-1])
// The constraints are pointless without more than one provider.
112
+
returnresult
113
+
}
114
+
result.constraints=append(result.constraints, PrettyConstraint(solver.Mandatory(), fmt.Sprintf("there can be only one provider of %s", gvk)))
115
+
116
+
vars []string
117
+
for_, p:=rangeproviders {
118
+
s=append(s, p.String())
96
119
}
97
-
r.constraints=append(r.constraints, PrettyConstraint(solver.Dependency(dependencies...), fmt.Sprintf("subscription to %%s requires at least one of %s", strings.Join(s, ", "))))
120
+
msg:=fmt.Sprintf("%s and %s provide %s", strings.Join(s[:len(s)-1], ", "), s[len(s)-1], gvk)
// The constraints are pointless without more than one provider.
132
+
returnresult
133
+
}
134
+
result.constraints=append(result.constraints, PrettyConstraint(solver.Mandatory(), fmt.Sprintf("there can be only one operator from package %s", pkg)))
135
+
136
+
vars []string
137
+
for_, p:=rangeproviders {
138
+
s=append(s, p.String())
139
+
}
140
+
msg:=fmt.Sprintf("%s and %s originate from package %s", strings.Join(s[:len(s)-1], ", "), s[len(s)-1], pkg)
0 commit comments