mirror of https://github.com/docker/compose.git
move context cmd to its own folder ; initial `docker context login` command
This commit is contained in:
parent
230cccff76
commit
eea84cd487
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue