Skip to content

Commit

Permalink
fix: bug in utility function
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Jun 25, 2020
1 parent 9369406 commit 42c8022
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 --
Expand Down

0 comments on commit 42c8022

Please sign in to comment.