Fix a names-generator binary
To ensure that namesgenerator binary outputs random name
by initializing Seed.
not use init function.
@@ -2,10 +2,13 @@ package main
import (
"fmt"
+ "math/rand"
+ "time"
"github.com/docker/docker/pkg/namesgenerator"
)
func main() {
+ rand.Seed(time.Now().UnixNano())
fmt.Println(namesgenerator.GetRandomName(0))
}
