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 <[email protected]>
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 --