🎨 Format files

This commit is contained in:
2025-04-03 05:01:22 +04:00
parent e80ae9ab24
commit 42d5617e3f
16 changed files with 55 additions and 49 deletions

View File

@@ -6,9 +6,5 @@ func IsNilOrZero[T comparable](value *T) bool {
}
var zero T
if *value == zero {
return true
}
return false
return *value == zero
}

View File

@@ -20,9 +20,9 @@ func Flatten[T any](nested [][]*T) []*T {
// The returned function isn't thread-safe and should be used in a single-threaded context.
func RandomValueCycle[Value any](values []Value, localRand *rand.Rand) func() Value {
var (
clientsCount int = len(values)
currentIndex int = localRand.Intn(clientsCount)
stopIndex int = currentIndex
clientsCount = len(values)
currentIndex = localRand.Intn(clientsCount)
stopIndex = currentIndex
)
return func() Value {