mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
eaab2f7150
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>
14 lines
198 B
Go
14 lines
198 B
Go
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))
|
|
}
|