Files
podman/libpod/runtime_pre_go1.20.go
Paul Holzinger bad25da92e libpod: add !remote tag
This should never be pulled into the remote client.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-24 12:11:34 +02:00

19 lines
437 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
// +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())
}