mirror of
https://github.com/aykhans/dodo.git
synced 2025-09-03 18:03:34 +00:00
🎨 Format files
This commit is contained in:
@@ -6,9 +6,5 @@ func IsNilOrZero[T comparable](value *T) bool {
|
||||
}
|
||||
|
||||
var zero T
|
||||
if *value == zero {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
return *value == zero
|
||||
}
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user