Skip to content

Commit

Permalink
bigfix: didn't produce the expected results
Browse files Browse the repository at this point in the history
  • Loading branch information
rumenvasilev committed Sep 20, 2023
1 parent d38bf77 commit 849cbf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/util/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ func AppendIfMissing(slice []string, s string) []string {
// AppendToSlice will append additional items to slice if not present already and return a new slice
// additional trim support is present, if necessary
func AppendToSlice(trim bool, input, target []string) []string {
var result []string
result := target
for _, v := range input {
if trim {
v = strings.TrimSpace(v)
}
result = AppendIfMissing(target, v)
result = AppendIfMissing(result, v)
}
return result
}

0 comments on commit 849cbf1

Please sign in to comment.