ledo/app/cmd/mode/select.go

27 lines
571 B
Go
Raw Permalink Normal View History

2021-10-21 00:51:32 +00:00
package mode
import (
"github.com/urfave/cli/v2"
"ledo/app/modules/context"
"ledo/app/modules/interact"
)
var CmdModeSelect = cli.Command{
Name: "select",
Usage: "select run mode",
Description: `Select mode defined in project config file`,
ArgsUsage: "[<mode>]",
Action: RunSelectMode,
}
func RunSelectMode(cmd *cli.Context) error {
ctx := context.InitCommand(cmd)
if cmd.Args().Len() == 1 {
ctx.Mode.SetMode(cmd.Args().First())
return nil
}
2021-11-20 10:34:31 +00:00
// interact.SelectDockerHubTag("paramah/php")
2021-10-21 00:51:32 +00:00
interact.SelectMode(ctx, "")
return nil
}