Switch remote deploy to vendored source builds
Move remote deployment to a vendored source bundle built on the target host via Docker so redeploys no longer require local cross-compilation or host Go installation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
23
vendor/github.com/samber/lo/mutable/slice.go
generated
vendored
Normal file
23
vendor/github.com/samber/lo/mutable/slice.go
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
package mutable
|
||||
|
||||
import "github.com/samber/lo/internal/rand"
|
||||
|
||||
// Shuffle returns an array of shuffled values. Uses the Fisher-Yates shuffle algorithm.
|
||||
// Play: https://go.dev/play/p/ZTGG7OUCdnp
|
||||
func Shuffle[T any, Slice ~[]T](collection Slice) {
|
||||
rand.Shuffle(len(collection), func(i, j int) {
|
||||
collection[i], collection[j] = collection[j], collection[i]
|
||||
})
|
||||
}
|
||||
|
||||
// Reverse reverses array so that the first element becomes the last, the second element becomes the second to last, and so on.
|
||||
// Play: https://go.dev/play/p/iv2e9jslfBM
|
||||
func Reverse[T any, Slice ~[]T](collection Slice) {
|
||||
length := len(collection)
|
||||
half := length / 2
|
||||
|
||||
for i := 0; i < half; i = i + 1 {
|
||||
j := length - 1 - i
|
||||
collection[i], collection[j] = collection[j], collection[i]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user