mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Fix a names-generator binary
To ensure that namesgenerator binary outputs random name by initializing Seed. Signed-off-by: Mizuki Urushida <z11111001011@gmail.com> not use init function. Signed-off-by: Mizuki Urushida <z11111001011@gmail.com>
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user