Skip to content

Commit

Permalink
Support older Go versions, take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ncabatoff committed Feb 6, 2024
1 parent 592b21a commit 5a3d611
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strutil/strutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"unicode"

glob "github.com/ryanuber/go-glob"
"golang.org/x/exp/slices"
)

// StrListContainsGlob looks for a string in a list of strings and allows
Expand Down Expand Up @@ -370,7 +369,8 @@ func StrListDelete(s []string, d string) []string {
if element == d {
// Using the provided slice as the basis for the return value can
// result in confusing behaviour, see https://go.dev/play/p/EAtNw4lLugu
s = slices.Clone(s)
c := make([]string, len(s))
copy(c, s)
return append(s[:index], s[index+1:]...)
}
}
Expand Down

0 comments on commit 5a3d611

Please sign in to comment.