cmd: seed math rand

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2020-05-17 16:21:11 -07:00
parent 42448c5f37
commit 7f7acf7837
5 changed files with 96 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"os"
"github.com/containerd/containerd/pkg/seed"
"github.com/docker/buildx/commands"
"github.com/docker/buildx/version"
"github.com/docker/cli/cli-plugins/manager"
@@ -24,6 +25,10 @@ import (
var experimental string
func init() {
seed.WithTimeAndRand()
}
func main() {
if os.Getenv("DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND") == "" {
if len(os.Args) < 2 || os.Args[1] != manager.MetadataSubcommandName {