You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2020/06/25 09:44:37 UTC
[camel-k] branch master updated: fix: bug in utility function
This is an automated email from the ASF dual-hosted git repository.
nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/master by this push:
new 42c8022 fix: bug in utility function
42c8022 is described below
commit 42c8022241d2810b8a522b505bf540b21b640733
Author: Nicola Ferraro <ni...@gmail.com>
AuthorDate: Wed Jun 24 10:36:49 2020 +0200
fix: bug in utility function
---
pkg/util/util.go | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pkg/util/util.go b/pkg/util/util.go
index 34ac490..5a48a8e 100644
--- a/pkg/util/util.go
+++ b/pkg/util/util.go
@@ -90,12 +90,13 @@ func StringSliceUniqueAdd(slice *[]string, item string) bool {
// StringSliceUniqueConcat append all the items of the "items" slice if they are not already present in the slice
func StringSliceUniqueConcat(slice *[]string, items []string) bool {
+ changed := false
for _, item := range items {
- if !StringSliceUniqueAdd(slice, item) {
- return false
+ if StringSliceUniqueAdd(slice, item) {
+ changed = true
}
}
- return true
+ return changed
}
// EncodeXML --