Files
podman/libpod/runtime_pre_go1.20.go
Oleksandr Redko 2a2d0b0e18 chore: delete obsolete // +build lines
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-04 11:53:38 +02:00

18 lines
411 B
Go

// In go 1.20 and later, the global RNG is automatically initialized.
// Ref: https://pkg.go.dev/math/rand@go1.20#Seed
//go:build !go1.20 && !remote
package libpod
import (
"math/rand"
"time"
)
func init() {
// generateName calls namesgenerator.GetRandomName which the
// global RNG from math/rand. Seed it here to make sure we
// don't get the same name every time.
rand.Seed(time.Now().UnixNano())
}