squakez commented on code in PR #4153:
URL: https://github.com/apache/camel-k/pull/4153#discussion_r1146084126
##########
pkg/controller/integration/kits.go:
##########
@@ -250,3 +256,17 @@ func matchesTrait(it map[string]interface{}, kt
map[string]interface{}) bool {
// perform exact match on the two trait maps
return reflect.DeepEqual(it, kt)
}
+
+func hasMatchingSources(it *v1.Integration, kit *v1.IntegrationKit) bool {
+ for _, itSource := range it.Sources() {
+ for _, ikSource := range kit.Spec.Sources {
+ if itSource.Content == ikSource.Content {
+ // found, let's move to the next one
+ break
+ }
+ return false
+ }
+
+ }
+ return true
Review Comment:
I refactored the loop anyhow to validate against all possible scenarios.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]