Skip to content

Commit

Permalink
avoid using slices.Concat which is not in Go 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
letFunny committed Jul 10, 2024
1 parent eff44b1 commit 01f01f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ func (r *Release) validate() error {
return nil
}
for _, new := range globs {
for _, old := range slices.Concat(globs, copies) {
// TODO replace with slices.Concat once we upgrade to go 1.22.
for _, old := range append(globs, copies...) {
if new.slice.Package == old.slice.Package {
continue
}
Expand All @@ -234,7 +235,8 @@ func (r *Release) validate() error {
}
}
for _, new := range generates {
for _, old := range slices.Concat(copies, globs, rest) {
// TODO replace with slices.Concat once we upgrade to go 1.22.
for _, old := range append(copies, append(globs, rest...)...) {
err := checkConflict(old, new)
if err != nil {
return err
Expand Down

0 comments on commit 01f01f2

Please sign in to comment.