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:
Mizuki Urushida 2017-10-25 17:09:51 +09:00
parent d85f5e7320
commit eaab2f7150

View file

@ -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))
}