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:
parent
d85f5e7320
commit
eaab2f7150
1 changed files with 3 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue