essobedo commented on code in PR #4021:
URL: https://github.com/apache/camel-k/pull/4021#discussion_r1095691238
##########
pkg/client/camel/applyconfiguration/camel/v1/buildertask.go:
##########
@@ -96,3 +97,16 @@ func (b *BuilderTaskApplyConfiguration) WithBuildDir(value
string) *BuilderTaskA
b.BuildDir = &value
return b
}
+
+// WithSources adds the given value to the Sources field in the declarative
configuration
+// and returns the receiver, so that objects can be build by chaining "With"
function invocations.
+// If called multiple times, values provided by each call will be appended to
the Sources field.
+func (b *BuilderTaskApplyConfiguration) WithSources(values
...*SourceSpecApplyConfiguration) *BuilderTaskApplyConfiguration {
+ for i := range values {
+ if values[i] == nil {
+ panic("nil value passed to WithSources")
Review Comment:
We have the same behavior in the [integration
spec](https://github.com/apache/camel-k/blob/main/pkg/client/camel/applyconfiguration/camel/v1/integrationspec.go#L63),
so in practice, it would fail before. So if it is an issue, IMHO, it should be
addressed in a dedicated ticket, don't you agree?
--
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]