From eea84cd487b48a05a1775b929e177093eb7cd685 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Mon, 11 May 2020 14:39:43 +0200 Subject: [PATCH] move context cmd to its own folder ; initial `docker context login` command --- cli/cmd/context/context.go | 2 ++ cli/cmd/context/login/login.go | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 cli/cmd/context/login/login.go diff --git a/cli/cmd/context/context.go b/cli/cmd/context/context.go index aea5e7bf3..25209193e 100644 --- a/cli/cmd/context/context.go +++ b/cli/cmd/context/context.go @@ -28,6 +28,7 @@ package context import ( + "github.com/docker/api/cli/cmd/context/login" "github.com/spf13/cobra" cliopts "github.com/docker/api/cli/options" @@ -45,6 +46,7 @@ func Command(opts *cliopts.GlobalOpts) *cobra.Command { listCommand(), removeCommand(), useCommand(opts), + login.Command(), ) return cmd diff --git a/cli/cmd/context/login/login.go b/cli/cmd/context/login/login.go new file mode 100644 index 000000000..7ee9a49b4 --- /dev/null +++ b/cli/cmd/context/login/login.go @@ -0,0 +1,28 @@ +package login + +import ( + "github.com/spf13/cobra" +) + +// Command returns the compose command with its child commands +func Command() *cobra.Command { + command := &cobra.Command{ + Short: "Cloud login for docker contexts", + Use: "login", + } + command.AddCommand( + azureLoginCommand(), + ) + return command +} + +func azureLoginCommand() *cobra.Command { + azureLoginCmd := &cobra.Command{ + Use: "azure", + RunE: func(cmd *cobra.Command, args []string) error { + return nil + }, + } + + return azureLoginCmd +}